Added validation and before_save to close #15.