Add NilOutput type
Nicer output formatting
Cruft removal and better commenting.