Modularize and human-readable modes

This depends on the getopts branch.

There's too much work to do all at once, so there will be some cleanup afterwards that we'll both have to do. That being said, this works pretty well.

---Alex