More datamodel and backend API work.