Moved var declarations out of loop