Replaced deprecated `has` and `contains` uses