changes to get api calls working and other fixes