Fixed a map generation issue where in some locations you could travel west into the void. Cleaned up the code.