Break flag setting into a helper; add helper for ssh flags; fix bugs.
Translate CR to NL on input.
Don't turn post-processing off.
Remove useless comments; remove dead code.
Formatting.