Merge pull request #245 from Useful-Innovation/johans-fixes

fixed some model functions