Remove unused variables and comments