Moving flask startup stuff