Add configurable, improved autoreplacing.