Switch to using Flask