Factors out the Flask components to other modules