Refactor stage