added test to reproduce issue 33 and issue 38
fix for issue 33 and issue 38
fixed order of imports
code cleanup
Merge pull request #17 from sclassen/master

Fix for issue 33 and 38