Model refactored for relationships
fixed error with validation