Refactored algorithm for generating maps.