refactored flags to take default os env var and added heroku procfile