Fix a bug where edge of world map would not be used for mesh generation
Teak numbers used for terrain generation and rendering
Big refactoring of mesh generation for readability and maintainability