Move variable declaration to top