Fixed tests and minor refactoring
Merge pull request #79 from jchristo4/master

Test fixes and minor refactoring