Hoist vars and move them to separate lines