Refactor begin