Refactored making groups of markers for map