Switch to Makefiles to ease debugging.
Remove a lot of extra whitespace.
Reindent to OTBS.

Apologies for this.  I don't plan to make functional changes to this code, so
this is mostly for my own readability.
Remove unused variables.