small optimisation, remove redundant assignment and variable