refactoring of code replacer interface to allow putting the Patterns as reusable blocks elsewhere.