Add tests.
Merge pull request #2 from eiriksm/tests

Add tests. Relates to #1