Small error fixes that were not being tested.
Removal of unused imports
Merge pull request #42 from larsssono/master

Minor cleanup and fixes