Code clean up in the map creation controller