Refactored world generation.