Added type model and associations.