Premature optimisation

Removed unnecessary loop and variable