Move variables to top of scope