fixed a few typos and removed unnecessary code.

Fix the typo in the documentation.
Removed unused variable defs and an import.