complete rewrite - getting ready for the next step... which is to add the web interface and REPL that will allow better control over the proxy...