Added unit tests.
Merge pull request #17 from discordier/unit-tests

Add unit tests.