Added some changes to Flask