fixes and changes to api model