added  unit tests/cleaned up some code
Corrected typo and removed unused imports
Merge pull request #116 from paddatrapper/master

Added  unit tests and cleaned up some code