Refactored terrain to be an object