Replace substrs with strpos, where useful.