Remove smatterings of util::replace everywhere