Remove unused functions and classes