Updated the flask main file