Refactoring open/close doors