Cleanup some whitespace inconsistency.

Also put open curly braces of function body on a new line.