Refactor the refactor code