Syntax and formatting fixes