Refactored: app settings, cleaner app.py