Applied terrain refactoring.