Remove unused variables and declarations