Complete unit tests, close #26