Use WordPress standards formatting

Mostly spacing and indentation. Also adds curly braces to if statements as per standards.
http://make.wordpress.org/core/handbook/coding-standards/php/#brace-style
Actually no.
http://make.wordpress.org/core/handbook/inline-documentation-standards/php-documentation-standards/#1-functions-and-class-methods