Adds output unit selection

Improves the argument parser as well, although the parser is still a
horrible kludge.