Moved some functions to a library; Added some tests
Merge remote-tracking branch 'upstream/master'
Updated README to add tests
Merge pull request #19 from pleary/master

Added testing; moved some functions to a library