Insert refactor