Fixed most of the errors.