Fix all major syntax errors