RC4 fully working; socket handling improvements