Improvements to AssemblyReplacer