Corrected model definitions, and added associations as well.