diff --git a/configure.in b/configure.in
index 57becc2..5c749f6 100644
--- a/configure.in
+++ b/configure.in
@@ -117,30 +117,14 @@ AM_CHECK_PYORBIT_MOD(GNOME_Magnifier,,[AC_MSG_WARN(Could not find python ORBit m
 
 AM_CHECK_PYMOD(brlapi,,[brlapi_available="yes"],[brlapi_available="no"])
 
-AC_ARG_ENABLE(liblouis, 
-              AC_HELP_STRING([--enable-liblouis=@<:@no/yes/auto@:>@],
-                             [enable the use of liblouis]),,
-              enable_liblouis=auto)
-
 LOUIS_TABLE_DIR=""
 
-if test "x$enable_liblouis" != "xno"; then
-   PKG_CHECK_MODULES(LOUIS, "liblouis", have_liblouis=yes, have_liblouis=no)
-   if test x$have_liblouis = "xyes"; then
-      LOUIS_TABLE_DIR=`pkg-config --variable=tablesdir liblouis`
-   fi
-else
-   have_liblouis=no
+PKG_CHECK_MODULES(LOUIS, "liblouis", have_liblouis=yes, have_liblouis=no)
+if test x$have_liblouis = "xyes"; then
+  LOUIS_TABLE_DIR=`pkg-config --variable=tablesdir liblouis`
 fi
 
 AC_SUBST(LOUIS_TABLE_DIR)
-if test "x$enable_liblouis" = "xyes"; then
-   if test "x$have_liblouis" != "xyes"; then
-      AC_MSG_ERROR([Couldn't find Liblouis])
-   fi
-fi
-
-AM_CONDITIONAL(WITH_LOUIS, test x$have_liblouis = "xyes")
 
 AC_SUBST(orca_LIBS)
 AC_SUBST(orca_CFLAGS)
@@ -157,8 +141,6 @@ docs/man/Makefile
 po/Makefile.in
 icons/Makefile
 src/Makefile
-src/louis/Makefile
-src/louis/constants.py
 src/orca/Makefile
 src/orca/scripts/Makefile
 src/orca/scripts/apps/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index 1c417c6..8e608ad 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1 @@
-if WITH_LOUIS
-SUBDIRS = orca louis
-else
 SUBDIRS = orca
-endif
\ No newline at end of file
diff --git a/src/louis/Makefile.am b/src/louis/Makefile.am
deleted file mode 100644
index f7ceb8f..0000000
--- a/src/louis/Makefile.am
+++ /dev/null
@@ -1,24 +0,0 @@
-louis_LTLIBRARIES = _louis.la
-
-louisdir = $(pyexecdir)/orca/louis
-
-_louis_la_CFLAGS = 		\
-	$(LOUIS_CFLAGS) 	\
-	$(PYTHON_INCLUDES)
-
-_louis_la_LDFLAGS = 	\
-	$(LOUIS_LIBS)	\
-	-module 			\
-	-avoid-version 		\
-	-llouis
-
-_louis_la_SOURCES = \
-	_louis.c
-
-louis_pythondir=$(louisdir)
-
-louis_python_PYTHON = \
-	__init__.py 
-
-nodist_louis_python_PYTHON = \
-	constants.py
\ No newline at end of file
diff --git a/src/louis/__init__.py b/src/louis/__init__.py
deleted file mode 100644
index 8e029ec..0000000
--- a/src/louis/__init__.py
+++ /dev/null
@@ -1,198 +0,0 @@
-# Liblouis Python bindings
-#
-# Copyright 2007-2008 Eitan Isaacson
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library General Public
-# License along with this library; if not, write to the
-# Free Software Foundation, Inc., Franklin Street, Fifth Floor,
-# Boston MA  02110-1301 USA.
-
-"""Liblouis Python bindings"""
-
-__copyright__ = "Copyright (c) 2007-2008 Eitan Isaacson"
-__license__   = "LGPL"
-
-from constants import *
-import os
-
-def listTables():
-   tables = {}
-   try:
-      for fname in os.listdir(TABLES_DIR):
-         if fname[-4:] in ('.utb', '.ctb'):
-            alias = fname[:-4]
-            tables[TABLE_NAMES.get(alias, alias)] = \
-                                          os.path.join(TABLES_DIR, fname)
-   except OSError:
-      pass
-
-   return tables
-
-def getDefaultTable():
-   try:
-      for fname in os.listdir(TABLES_DIR):
-         if fname[-4:] in ('.utb', '.ctb'):
-            if fname.startswith('en-us'):
-               return os.path.join(TABLES_DIR, fname)
-   except OSError:
-      pass
-
-   return ''
-
-#####################################################################
-#
-# The following code is here to compensate on a few current liblouis
-# bugs.
-#
-#####################################################################
-
-import _louis
-version = _louis.version
-translateString = _louis.translateString
-
-def translate(tran_tables, inbuf, typeform=[], cursorPos=0, mode=0):
-   if mode == MODE.compbrlAtCursor:
-      contracted, inPos, outPos, cursorPos,  = \
-                  _expandAtCursor(tran_tables, inbuf,
-                                  typeform, cursorPos, mode)
-   else:
-      contracted, inPos, outPos, cursorPos,  = \
-                  _louis.translate(tran_tables, inbuf,
-                                    typeform, cursorPos, mode)
-      
-   return contracted, inPos, outPos, cursorPos
-
-def _expandAtCursor(tran_tables, inbuf, typeform=[], cursorPos=0, mode=0):
-   """Contracts a inbuf, leaving the word under the cursor expanded.
-   This is a temporary method that should disappear once liblouis
-   get it right.
-   
-   Arguments:
-   - inbuf: Inbuf to contract.
-   - cursorPos: Offset of cursor.
-   """
-   prefix, uncontractedWord, suffix  = \
-           _divideLine(inbuf, cursorPos)
-
-   cursorInWord = cursorPos - len(prefix)
-
-   # Contract prefix
-   # 
-   prefixContracted, prefixInPos, prefixOutPos, cursorPos = \
-                     _louis.translate(tran_tables,
-                                     prefix.decode())
-
-   # Contract suffix
-   # 
-   suffixContracted, suffixInPos, suffixOutPos, cursorPos = \
-                     _louis.translate(tran_tables,
-                                     suffix.decode())
-
-   cursorPos = len(prefixContracted) + cursorInWord
-   
-   contracted = prefixContracted + \
-                uncontractedWord + \
-                suffixContracted
-
-   inPos = _mushPosArrays(prefixInPos,
-                          len(uncontractedWord),
-                          suffixInPos)
-
-   outPos = _mushPosArrays(prefixOutPos,
-                           len(uncontractedWord),
-                           suffixOutPos)
-
-   return contracted, inPos, outPos, cursorPos
-
-def _mushPosArrays(prefixPos, uncontractedLen, suffixPos):
-   try:
-      uncontractedPos = range(prefixPos[-1] + 1,
-                              uncontractedLen+prefixPos[-1] + 1)
-   except IndexError:
-      uncontractedPos = range(uncontractedLen)
-
-   pos = prefixPos + \
-         uncontractedPos
-
-   try:
-      suffixOffset = pos[-1] + 1
-   except IndexError:
-      suffixOffset = 0
-
-   pos += [offs + suffixOffset for offs in suffixPos]
-
-   return pos
-
-def _partition(myStr, mySep):
-   """Provides an implementation of partition for compatibility with
-   Python 2.4.
-
-   Arguments:
-   - myStr: the string
-   - mySep: the separator to look for, starting at the beginning of the string
-
-   Returns:
-   (stringBeforeSep, mySep, stringAfterSep)
-   """
-
-   try:
-     return myStr.partition(mySep)
-   except AttributeError:
-     index = myStr.find(mySep)
-     if index < 0:
-        return (myStr, u'', u'')
-     else:
-        return (myStr[0:index], 
-                myStr[index:index+len(mySep)], 
-                myStr[index+len(mySep):])
-
-def _rpartition(myStr, mySep):
-   """Provides an implementation of rpartition for compatibility with
-   Python 2.4.
-
-   Arguments:
-   - myStr: the string
-   - mySep: the separator to look for, starting at the end of the string
-
-   Returns:
-   (stringBeforeSep, mySep, stringAfterSep)
-   """
-
-   try:
-     return myStr.rpartition(mySep)
-   except AttributeError:
-     index = myStr.rfind(mySep)
-     if index < 0:
-        return (u'', u'', myStr)
-     else:
-        return (myStr[0:index], 
-                myStr[index:index+len(mySep)], 
-                myStr[index+len(mySep):])
-
-def _divideLine(line, offset):
-   """Isolates a word the cursor is on and returns the prefix,
-   the cursored word, and the suffix. This is a temporary method
-   that avoids a liblouis bug.
-   
-   Arguments:
-   - line: The line to process.
-   - offset: The offset of the cursor.
-   """
-   if len(line) <= offset:
-      return line, '', ''
-   
-   firstHalf = _rpartition(line[:offset], ' ')
-   secondHalf = _partition(line[offset:], ' ')
-   return firstHalf[0] + firstHalf[1], \
-          firstHalf[2] + secondHalf[0], \
-          secondHalf[1] + secondHalf[2]
diff --git a/src/louis/_louis.c b/src/louis/_louis.c
deleted file mode 100644
index 039344e..0000000
--- a/src/louis/_louis.c
+++ /dev/null
@@ -1,240 +0,0 @@
-/* Liblouis Python bindings
- *
- * Copyright 2007-2008 Eitan Isaacson
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., Franklin Street, Fifth Floor,
- * Boston MA  02110-1301 USA.
- *
- */
-
-#include <string.h>
-#include <errno.h>
-#include <dlfcn.h>
-#include <Python.h>
-#include <liblouis.h>
-
-static PyObject *module;
-
-static PyObject *
-louis_version(PyObject *self)
-{
-		const char *version_string;
-		version_string = lou_version();
-		return Py_BuildValue("s", version_string);
-}
-
-
-char *
-pylist_to_string(PyObject *list)
-{
-		PyObject *list_joined, *sep;
-		char *rv;
-
-		sep = PyString_FromString(",");
-		list_joined = PyUnicode_Join(sep, list);
-		if (list_joined == NULL) 
-        {
-				/* Some list items were probably not strings */
-				Py_DECREF(sep);
-				return NULL;
-        }
-		rv = strdup(PyString_AsString(list_joined));
-
-		Py_DECREF(list_joined);
-		Py_DECREF(sep);
-
-		return rv;
-}
-
-char *
-pylist_to_typeform(PyObject *typeform_list, int len)
-{
-		char *typeform;
-		int i;
-		PyObject *l_item;
-		typeform = calloc(len, sizeof(char));
-		for (i=0; i < len; i++)
-		{
-				l_item = PySequence_Fast_GET_ITEM(typeform_list, i);
-				typeform[i] = (char)PyInt_AsLong(l_item);
-		}
-		return typeform;
-		
-}
-
-PyObject *
-intbuf_to_pylist(int *intbuf, int len)
-{
-		PyObject *pylist;
-		int i;
-
-		pylist = PyList_New(len);
-
-		for (i=0;i<len;i++)
-				PyList_SetItem(pylist, i, PyInt_FromLong((long)intbuf[i]));
-
-		return pylist;
-}
-
-static PyObject *
-louis_translateString(PyObject *self, PyObject *args, PyObject *kw)
-{
-        static char *kw_args[]={"tran_tables", "inbuf", 
-                                "typeform", "spacing", "mode", 0};
-		char *typeform = NULL, *trantab_joined, *spacing = NULL;
-		widechar *outbuf;
-		int inlen, outlen, mode = 0;
-		PyObject *trantab_list, *out, *typeform_list = NULL;
-		Py_UNICODE *u_inbuf;
-		int rv;
-
-		if (!PyArg_ParseTupleAndKeywords(args, kw,
-                                         "Ou#|OOi:translateString", kw_args,
-                                         &trantab_list, &u_inbuf, &inlen,
-                                         &typeform_list, &spacing, &mode))
-		{
-				return NULL;
-        }
-        
-		trantab_joined = pylist_to_string(trantab_list);
-
-        if (trantab_joined == NULL) 
-        {
-               PyErr_SetString(
-                       PyExc_TypeError,
-                       "translateString() argument 1 needs to be a list of strings"); 
-               return NULL;
-        }
-
-		if (PySequence_Size(typeform_list) > 0) 
-				typeform = pylist_to_typeform(typeform_list, 
-                                              PySequence_Size(typeform_list));
-
-        outlen = inlen*2;
-		outbuf = calloc(outlen, sizeof(widechar));
-
-		rv = lou_translateString(trantab_joined, (widechar *)u_inbuf, 
-                                 &inlen, outbuf, &outlen, typeform, 
-                                 spacing, mode);
-
-        out = PyUnicode_FromUnicode((Py_UNICODE *)outbuf, outlen);
-
-		if (typeform != NULL)
-				free(typeform);
-		free(trantab_joined);
-        free(outbuf);
-
-        PyErr_Clear();
-
-        return out;
-
-}
-
-static PyObject *
-louis_translate(PyObject *self, PyObject *args, PyObject *kw)
-{
-        static char *kw_args[]={"tran_tables", "inbuf", 
-                                "typeform", "cursorPos","mode", 0};
-		char *typeform = NULL, *trantab_joined, *spacing = NULL;
-		widechar *outbuf;
-		int inlen, outlen, mode = 0, cursorPos = 0, inlen_cp;
-		int rv, *outputPos = NULL, *inputPos = NULL, i;
-		PyObject *trantab_list, *out, *typeform_list = NULL, *outputPos_list,
-				*inputPos_list;
-		Py_UNICODE *u_inbuf;
-
-		if (!PyArg_ParseTupleAndKeywords(args, kw,
-                                         "Ou#|Oii:translate", kw_args,
-                                         &trantab_list, &u_inbuf, &inlen,
-                                         &typeform_list, &cursorPos,
-										 &mode))
-		{
-				return NULL;
-        }
-        
-		trantab_joined = pylist_to_string(trantab_list);
-
-        if (trantab_joined == NULL) 
-        {
-               PyErr_SetString(
-                       PyExc_TypeError,
-                       "translateString() argument 1 needs to be a list of strings"); 
-               return NULL;
-        }
-
-		if (PySequence_Size(typeform_list) > 0) 
-				typeform = pylist_to_typeform(typeform_list, 
-                                              PySequence_Size(typeform_list));
-
-
-        inlen_cp = inlen;
-
-		inputPos = calloc(inlen*2, sizeof(int));
-
-        outlen = inlen*2;
-		outbuf = calloc(outlen, sizeof(widechar));
-		outputPos = calloc(outlen, sizeof(int));
-
-		rv = lou_translate(trantab_joined, (widechar *)u_inbuf, 
-                           &inlen, outbuf, &outlen, typeform, spacing, 
-                           outputPos, inputPos, &cursorPos, mode);
-
-        out = PyUnicode_FromUnicode((Py_UNICODE *)outbuf, outlen);
-		inputPos_list = intbuf_to_pylist(inputPos, outlen);
-		outputPos_list = intbuf_to_pylist(outputPos, inlen_cp);
-
-		if (typeform != NULL) 
-                free(typeform);
-		free(trantab_joined);
-        free(outbuf);
-        free(outputPos);
-        free(inputPos);
-
-        PyErr_Clear();
-
-        return Py_BuildValue("(NNNi)", out, inputPos_list, 
-							 outputPos_list, cursorPos);
-
-}
-
-static PyMethodDef louis_methods[] = {
-		{"version", 
-         (PyCFunction) louis_version, METH_VARARGS},
-		{"translateString", 
-         (PyCFunction) louis_translateString, METH_KEYWORDS},
-		{"translate", 
-         (PyCFunction) louis_translate, METH_KEYWORDS},
-		{NULL, NULL}
-};
-
-static void
-cleanup_louis ()
-{
-        lou_free ();
-}
-
-PyMODINIT_FUNC 
-init_louis (void) {
-        static inited = 0;
-
-        module = Py_InitModule ("_louis", louis_methods);
-
-        if (!inited) {
-                inited = 1;
-                if (Py_AtExit(cleanup_louis) != 0)
-                        fprintf(stderr,
-                                "Louis: warning: cleanup procedure not registered\n");
-        }
-}
diff --git a/src/louis/constants.py.in b/src/louis/constants.py.in
deleted file mode 100644
index 6f55991..0000000
--- a/src/louis/constants.py.in
+++ /dev/null
@@ -1,71 +0,0 @@
-# Liblouis Python bindings
-#
-# Copyright 2007-2008 Eitan Isaacson
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library General Public
-# License along with this library; if not, write to the
-# Free Software Foundation, Inc., Franklin Street, Fifth Floor,
-# Boston MA  02110-1301 USA.
-
-
-from orca.orca_i18n import _           # for gettext support
-
-# Translators: These are the braille translation table names for different
-# languages. You could read about braille tables at:
-# http://en.wikipedia.org/wiki/Braille
-#
-TABLE_NAMES = {'Cz-Cz-g1': _('Czech Grade 1'),
-               'Es-Es-g1': _('Spanish Grade 1'),
-               'Fr-Ca-g2': _('Canada French Grade 2'),
-               'Fr-Fr-g2': _('France French Grade 2'),
-               'Lv-Lv-g1': _('Latvian Grade 1'),
-               'Nl-Nl-g1': _('Netherlands Dutch Grade 1'),
-               'No-No-g0': _('Norwegian Grade 0'),
-               'No-No-g1': _('Norwegian Grade 1'),
-               'No-No-g2': _('Norwegian Grade 2'),
-               'No-No-g3': _('Norwegian Grade 3'),
-               'Pl-Pl-g1': _('Polish Grade 1'),
-               'Pt-Pt-g1': _('Portuguese Grade 1'),
-               'Se-Se-g1': _('Swedish Grade 1'),
-               'ar-ar-g1': _('Arabic Grade 1'),
-               'cy-cy-g1': _('Welsh Grade 1'),
-               'cy-cy-g2': _('Welsh Grade 2'),
-               'de-de-g0': _('German Grade 0'),
-               'de-de-g1': _('German Grade 1'),
-               'de-de-g2': _('German Grade 2'),
-               'en-GB-g2': _('U.K. English Grade 2'),
-               'en-gb-g1': _('U.K. English Grade 1'),
-               'en-us-g1': _('U.S. English Grade 1'),
-               'en-us-g2': _('U.S. English Grade 2'),
-               'fr-ca-g1': _('Canada French Grade 1'),
-               'fr-fr-g1': _('France French Grade 1'),
-               'gr-gr-g1': _('Greek Grade 1'),
-               'hi-in-g1': _('Hindi Grade 1'),
-               'it-it-g1': _('Italian Grade 1'),
-               'nl-be-g1': _('Belgium Dutch Grade 1')}
-
-TABLES_DIR = '@LOUIS_TABLE_DIR@'
-
-class TYPEFORM:
-   plain_text = 0
-   italic = 1
-   underline = 2
-   bold = 4
-   computer_braille = 8
-
-class MODE:
-   noContractions = 1
-   compbrlAtCursor = 2
-   dotsIO = 4
-   comp8Dots = 8
-   
diff --git a/src/orca/braille.py b/src/orca/braille.py
index 193622e..f450ea2 100644
--- a/src/orca/braille.py
+++ b/src/orca/braille.py
@@ -35,14 +35,12 @@ import logging
 log = logging.getLogger("braille")
 
 import signal
+import os
 
 try:
     import louis
 except ImportError:
     louis = None
-    _defaultContractionTable = None
-else:
-    _defaultContractionTable = louis.getDefaultTable()
 
 try:
     import brlapi
@@ -67,6 +65,7 @@ import debug
 import eventsynthesizer
 import orca_state
 import settings
+from platform import tablesdir
 
 from orca_i18n import _                          # for gettext support
 
@@ -209,6 +208,67 @@ beginningIsShowing = False
 #
 cursorCell = 0
 
+# Translators: These are the braille translation table names for different
+# languages. You could read about braille tables at:
+# http://en.wikipedia.org/wiki/Braille
+#
+TABLE_NAMES = {"Cz-Cz-g1": _("Czech Grade 1"),
+               "Es-Es-g1": _("Spanish Grade 1"),
+               "Fr-Ca-g2": _("Canada French Grade 2"),
+               "Fr-Fr-g2": _("France French Grade 2"),
+               "Lv-Lv-g1": _("Latvian Grade 1"),
+               "Nl-Nl-g1": _("Netherlands Dutch Grade 1"),
+               "No-No-g0": _("Norwegian Grade 0"),
+               "No-No-g1": _("Norwegian Grade 1"),
+               "No-No-g2": _("Norwegian Grade 2"),
+               "No-No-g3": _("Norwegian Grade 3"),
+               "Pl-Pl-g1": _("Polish Grade 1"),
+               "Pt-Pt-g1": _("Portuguese Grade 1"),
+               "Se-Se-g1": _("Swedish Grade 1"),
+               "ar-ar-g1": _("Arabic Grade 1"),
+               "cy-cy-g1": _("Welsh Grade 1"),
+               "cy-cy-g2": _("Welsh Grade 2"),
+               "de-de-g0": _("German Grade 0"),
+               "de-de-g1": _("German Grade 1"),
+               "de-de-g2": _("German Grade 2"),
+               "en-GB-g2": _("U.K. English Grade 2"),
+               "en-gb-g1": _("U.K. English Grade 1"),
+               "en-us-g1": _("U.S. English Grade 1"),
+               "en-us-g2": _("U.S. English Grade 2"),
+               "fr-ca-g1": _("Canada French Grade 1"),
+               "fr-fr-g1": _("France French Grade 1"),
+               "gr-gr-g1": _("Greek Grade 1"),
+               "hi-in-g1": _("Hindi Grade 1"),
+               "it-it-g1": _("Italian Grade 1"),
+               "nl-be-g1": _("Belgium Dutch Grade 1")}
+
+def listTables():
+   tables = {}
+   try:
+      for fname in os.listdir(tablesdir):
+         if fname[-4:] in (".utb", ".ctb"):
+            alias = fname[:-4]
+            tables[TABLE_NAMES.get(alias, alias)] = \
+                                          os.path.join(tablesdir, fname)
+   except OSError:
+      pass
+
+   return tables
+
+def getDefaultTable():
+   try:
+      for fname in os.listdir(tablesdir):
+         if fname[-4:] in (".utb", ".ctb"):
+            if fname.startswith("en-us"):
+               return os.path.join(tablesdir, fname)
+   except OSError:
+      pass
+
+   return ""
+
+if louis:
+    _defaultContractionTable = getDefaultTable()
+
 def _printBrailleEvent(level, command):
     """Prints out a Braille event.  The given level may be overridden
     if the eventDebugLevel (see debug.setEventDebugLevel) is greater in
@@ -313,16 +373,16 @@ class Region:
             cursorOnSpace = False
 
         if not expandOnCursor or cursorOnSpace:
-            contracted, inPos, outPos, cursorPos = \
-                             louis.translate([self.contractionTable],
-                                             line,
-                                             cursorPos=cursorOffset)
+            mode = 0
         else:
-            contracted, inPos, outPos, cursorPos = \
-                             louis.translate([self.contractionTable],
-                                             line,
-                                             cursorPos=cursorOffset,
-                                             mode=louis.MODE.compbrlAtCursor)
+            mode = louis.compbrlAtCursor
+
+        contracted, inPos, outPos, cursorPos = \
+            louis.translate([self.contractionTable],
+                            line,
+                            cursorPos=cursorOffset,
+                            mode=mode)
+        print "CONTRACTION: mode=%d in='%s' out='%s'" % (mode, line, contracted)
 
         return contracted, inPos, outPos, cursorPos
 
diff --git a/src/orca/orca_gui_prefs.py b/src/orca/orca_gui_prefs.py
index acb7ff6..cdf25df 100644
--- a/src/orca/orca_gui_prefs.py
+++ b/src/orca/orca_gui_prefs.py
@@ -1540,15 +1540,19 @@ class OrcaSetupGUI(orca_glade.GladeWrapper):
             # currently used one.
             # 
             tablesCombo = self.get_widget("contractionTableCombo")
-            tableDict = louis.listTables()
+            tableDict = braille.listTables()
             selectedTableIter = None
             selectedTable = prefs["brailleContractionTable"] or \
-                             louis.getDefaultTable()
+                             braille.getDefaultTable()
             if tableDict:
                 tablesModel = gtk.ListStore(str, str)
-                for name, fname in tableDict.items():
+                names = tableDict.keys()
+                names.sort()
+                for name in names:
+                    fname = tableDict[name]
                     it = tablesModel.append([name, fname])
-                    if os.path.join(louis.TABLES_DIR, fname) == selectedTable:
+                    if os.path.join(braille.tablesdir, fname) == \
+                            selectedTable:
                         selectedTableIter = it
                 cell = self.planeCellRendererText
                 tablesCombo.pack_start(cell, True)
diff --git a/src/orca/platform.py.in b/src/orca/platform.py.in
index 5905047..4a4d9e5 100644
--- a/src/orca/platform.py.in
+++ b/src/orca/platform.py.in
@@ -41,3 +41,7 @@ package     = "@PACKAGE@"
 # The name of the data directory (usually "share").
 #
 datadirname = "@DATADIRNAME@"
+
+# The directory where we could find liblouis translation tables.
+#
+tablesdir = "@LOUIS_TABLE_DIR@"
