more client data model and API stuff WIP