New SOCKS4 handler, and some code changes