Cleaned up and corrected issues