ditch: Rework, clean up, and some other ideas.

This commit makes a few more things functions, although depending more
on global state than I'd perhaps like.  It also calculates the largest
username for my awk pretty printer.

It also adds some kind of semantic type signatures to the functions as a
mental note about what it accepts as inputs and what it eventually
returns.

This also removes a lot of commentary which was axiomatic wrt the code.