Remove redundant variables.