Added validation and associations