Updates to db models, minor changes to API