Updated the code formatting and comments to match Google's style guide