remove unnecessary functions and variables