move parse_args() out of main, other flake8 fixes #16