Changes made to conform with new API.