Refactored tilemap generation and rendering.