Add associations and improve model validations.