Refactoring.

Remove unnecessary blank lines and space chars. Make style of curly brackets consistent.