Add tests to, and close #3