Refactoring map generator....