More Flask-ish configs, use SQLAlchemy shortcuts
Stop using |safe
Switch to using current_app