Fix flask script, pep8