Remove unneeded methods and clean-up code.