* Update flask * Update flask and break apart different sections into different files * formatting * Fix test and add safety check