Refactored Editor into an object