integrate with models, work in progress

A LOT LOT LOT OF BUGS