Various bits of cleanup. Now the SSL proxy works in python 2 and 3.