Plan and refactoring