re-organize flask app