Changing over to flask