Change API calls to match new API

I have changed all the broken API calls that I have found to match the new API.