Refactor out map data class