moved the common option parsing into the app.py module.