adding `state` data type

Opening this now to more easily track/discuss changes and progress. Not ready to merge.