Pull all JS variables to the top of function for organization purposes
Reset variable position so map displays correctly