Complete rewrite of the data model

Note: this specification is intentionally not complete