Reorg config into Flask app