Minor cleanup.

Comments and indentation updated.
Variables renamed.
Conservative fix for headers comparison.