Add replacement logic (sans capitalization tricks)