corrected several typos, cleaned unused imports etc.