Remove duplication
More toMap functions