Create separate doReplacement function

Separate doReplacement function will be capable of handling more
complete item replacements in future implementations.