a lot of refactoring and making method names more useful