Adding more tests and extracting more code
Merge pull request #5 from NickHeiner/more-tests

Adding more tests and extracting more code