some syntax errors and formatting fixups