Refactored heightmap editor to allow for easier opening and closing.