Refactored according to the google-styleguide.