Remove unused variables and fields