Code cleanups. Improving code readability.

This is a second bunch of code cleanup commits. Please review.