A number of bug fixes.  Now full functionalty as before the major
refactoring effort is restored.