Added associations and validations.