fixed failing tests, removed unnecessary code