Implement code for tests in previous commit (and fix tests)