Refactor Werkzeug requirement into flask

This is a PR for discussion is a rewrite of the code base that removes Werkzeug and replaces the server code with a Flask implementation - see issue #38 .
Again, this isn't needed for the Flask  update so it should be removed.