Make the various from_str functions return options
So that they can be used with user input without causing task
Reformat for new mode syntax, step 1
Long lines were fixed in a very crude way, as I'll be following up
with another reformat in a bit.
Fix damage done by the pretty-printer
Reformat for new syntax