Fixed several typos and syntax errors