Add tests

Closes #2