Minor edits:  Tighten-up the halflen logic and touch-up the assertions and comments.