Added validation and generic dao