Refactor of a bunch of other stuff. No more inspection warnings!
Replace BaseHTTPServer with flask app.

Another night, another massive refactor :-P