Map generator refactoring

Using LazyString and Definition
Added utility methods
Minor fixes