Properly refactor for app.opts