Refactored API calls to use new api. #147