Refactory remoting layer.