mitmproxy -> libmproxy.main. do some leanup on the way