[wip] more unit tests and model work