Refactor 1stage.