[INTERNAL] generateMaps() restructured