Updated API related files

Had to make some minor modifications to conform to new api changes.