Port to Flask

I'm hoping to hack on this a bit during the holidays, just a heads-up. 

**DO NOT MERGE**