Some cleanups

Personally I prefer a bool cast here just because it's more intuitive. Most people assume preg_match returns a bool. A `1 === true` comparison will confuse these people.