Switched to Sockets. Other minor bugfixes.