Refactor argument parsers out into functions.
Group import statements as per PEP-8.