Reams of code markups after internal review.

No functional changes, just improvements to readability and maintainability.