Made fixes to accomodate validation.
Added more validation support.