Added valitations and fixed some associations.
Merge pull request #6 from heaphyg/validations

Added valitations and fixed some associations.