Fixed most of the errors from validation