`str_replace` or `str_ireplace`? You use the latter earlier, and I'm wondering what the rationale is for switching here.