Move variable definitions to top of function.