Remove unnecessary functions and classes.