New version using Flask and Mongo