Finally fixed many of these errors