Syntax and whitespace cleanup