More changes to make the api work