Fixed a few issues, and corrected some mistakes