Some minor changes and bug fixes.

-- Robert Ferdman, 4 August 2014