Fixes several syntax errors and whitespace