Code cleanup.

o Fix or acknowledge warnings.
o Apply code formatting rules.