Fix everything and get all the tests working