Added valitations and fixed some associations.