Update to use JS socket and address classes