Fixed (and passing) all the tests