Update API to return error objects on error
Yet again, fix issues with DB

I think we actually got it this time.

Individual server integration tests now happen in test database setup.
DB relationships should finally be properly configured.