Refactor how data is passed to the map controls