A bunch of fixes to the models