fix syntax errors and such