Refactor create and duplicate to use the same refresh logic