Merge pull request #32 from Gonthim/master

Finally getting around to implementing some unit tests.