Some variable wrangling. Need to be rid of the basemap managing code