Syntax fixes and formatting