Cleans up code. Removes untidy whitespace.

Jira issue: WP-874