Clean up various typos and syntax errors