Make the coding style consistent with the rest of Calc code.

I just ran SlickEdit's 'beautify' command with some follow-up manual
editing.

Change-Id: I402e782e7d147c4c95ebaa8ffcc40b50a0c565a7
Scope reduction by early bail-out.

Change-Id: Iacbf9f46a1b5683b6de5dd93002a69078af46951