Refactoring unnecessary code and classes.