Unit tests, closes #3