Remove unused variables and definitions