Add TODOs, clean up and reorder imports.
Distinguish interactive / non-interactive mode.
Add parse_arguments().
Finish implementation of main_noninteractive().