Update to be fully compatible with modern API

Removes last deprecated API call