Rename public interface to replaceCodes to noReset, and add tests for it.