Added tests
Moved code around.
added tests
moved code
Merge pull request #2 from genghisjahn/add_tests

Add tests