Unit tests

Closes #30.