Removed some lines of code and corrected spelling