Models and initial API

Work in progress -- not ready for merge, opening PR for feedback/discussion only.