Remove unused functions and variables