Added validation and formatted comments
Added validation rules for MetaData.
Fixed comment formatting and typos.