refactored and fixed tests
Merge pull request #4 from MauriceButler/refactor

refactored and fixed tests