small bugfixes to model before merge
Merge branch 'master' of https://github.com/healthgrades/optimus