Added unittests
Merge pull request #19 from jaytaph/unittests2

Added unittests