Remove unused variables and functions