Remove unused variables and methods