diff --git a/lib/nodejs/test/client.js b/lib/nodejs/test/client.js
index 2aa2295..a6fabfc 100644
--- a/lib/nodejs/test/client.js
+++ b/lib/nodejs/test/client.js
@@ -24,8 +24,6 @@
 var fs = require('fs');
 var assert = require('assert');
 var thrift = require('thrift');
-var ThriftTransports = require('thrift/transport');
-var ThriftProtocols = require('thrift/protocol');
 var ThriftTest = require('./gen-nodejs/ThriftTest');
 var ThriftTestDriver = require('./thrift_test_driver').ThriftTestDriver;
 var ThriftTestDriverPromise = require('./thrift_test_driver_promise').ThriftTestDriver;
@@ -39,32 +37,15 @@
   .option('--promise', 'test with promise style functions')
   .parse(process.argv);
 
-var protocol = undefined;
-var transport =  undefined;
-var testDriver = undefined;
 
-if (program.protocol === "binary") {
-  protocol = ThriftProtocols.TBinaryProtocol;
-} else if (program.protocol === "json") {
-  protocol = ThriftProtocols.TJSONProtocol;
-} else {
-  //default
-  protocol = ThriftProtocols.TBinaryProtocol;
-}
+var protocol = thrift.TBinaryProtocol;
+if (program.protocol === "json") {
+  protocol = thrift.TJSONProtocol;
+} 
 
+var transport =  thrift.TBufferedTransport;
 if (program.transport === "framed") {
-  transport = ThriftTransports.TFramedTransport;
-} else if (program.transport === "buffered") {
-  transport = ThriftTransports.TBufferedTransport;
-} else {
-  //default
-  transport = ThriftTransports.TBufferedTransport;
-}
-
-if (program.promise) {
-  testDriver = ThriftTestDriverPromise;
-} else {
-  testDriver = ThriftTestDriver;
+  transport = thrift.TFramedTransport;
 }
 
 var options = {
@@ -87,6 +68,10 @@
   assert(false, err);
 });
 
+var testDriver = ThriftTestDriver;
+if (program.promise) {
+  testDriver = ThriftTestDriverPromise;
+} 
 testDriver(client, function (status) {
   console.log(status);
   connection.end();
diff --git a/lib/nodejs/test/multiplex_client.js b/lib/nodejs/test/multiplex_client.js
index 9ef716b..6580cb5 100644
--- a/lib/nodejs/test/multiplex_client.js
+++ b/lib/nodejs/test/multiplex_client.js
@@ -17,13 +17,12 @@
  * under the License.
  */
 var thrift = require('thrift');
-var ThriftTransports = require('thrift/transport');
-var ThriftProtocols = require('thrift/protocol');
 var assert = require('assert');
 
 var ThriftTest = require('./gen-nodejs/ThriftTest'),
     SecondService = require('./gen-nodejs/SecondService'),
     ttypes = require('./gen-nodejs/ThriftTest_types');
+var ThriftTestDriver = require('./thrift_test_driver').ThriftTestDriver;
 
 var program = require('commander');
 
@@ -33,27 +32,16 @@
   .option('--ssl', 'use ssl transport')
   .parse(process.argv);
 
-var protocol = undefined;
-var transport =  undefined;
-
-if (program.protocol === "binary") {
-  protocol = ThriftProtocols.TBinaryProtocol;
-} else if (program.protocol === "json") {
-  protocol = ThriftProtocols.TJSONProtocol;
-} else {
-  //default
-  protocol = ThriftProtocols.TBinaryProtocol;
-}
-
+var transport =  thrift.TBufferedTransport;
 if (program.transport === "framed") {
-  transport = ThriftTransports.TFramedTransport;
-} else if (program.transport === "buffered") {
-  transport = ThriftTransports.TBufferedTransport;
-} else {
-  //default
-  transport = ThriftTransports.TBufferedTransport;
+  transport = thrift.TFramedTransport;
 }
 
+var protocol = thrift.TBinaryProtocol;
+if (program.protocol === "json") {
+  protocol = thrift.TJSONProtocol;
+} 
+
 var options = {
   transport: transport,
   protocol: protocol
@@ -76,290 +64,17 @@
     assert(false, err);
 });
 
-// deepEqual doesn't work with fields using node-int64
-
-function checkRecursively(map1, map2) {
-    if (typeof map1 !== 'function' && typeof map2 !== 'function') {
-        if (!map1 || typeof map1 !== 'object') {
-            assert.equal(map1, map2);
-        } else {
-            for (var key in map1) {
-                checkRecursively(map1[key], map2[key]);
-            }
-        }
-    }
-}
-
-client.testString("Test", function(err, response) {
+connection.on('connect', function() {
+  secondclient.secondtestString("Test", function(err, response) {
     assert(!err);
     assert.equal("Test", response);
-});
-secondclient.secondtestString("Test", function(err, response) {
-    assert(!err);
-    assert.equal("Test", response);
-});
+  });
 
-
-client.testVoid(function(err, response) {
-    assert(!err);
-    assert.equal(undefined, response); //void
-});
-
-
-secondclient.secondtestString("Test", function(err, response) {
-    assert(!err);
-    assert.equal("Test", response);
-});
-
-client.testString("", function(err, response) {
-    assert(!err);
-    assert.equal("", response);
-});
-
-// all Languages in UTF-8
-var stringTest = "Afrikaans, Alemannisch, Aragonés, العربية, مصرى, " +
-    "Asturianu, Aymar aru, Azərbaycan, Башҡорт, Boarisch, Žemaitėška, " +
-    "Беларуская, Беларуская (тарашкевіца), Български, Bamanankan, বাংলা, " +
-    "Brezhoneg, Bosanski, Català, Mìng-dĕ̤ng-ngṳ̄, Нохчийн, Cebuano, ᏣᎳᎩ, " +
-    "Česky, Словѣ́ньскъ / ⰔⰎⰑⰂⰡⰐⰠⰔⰍⰟ, Чӑвашла, Cymraeg, Dansk, Zazaki, " +
-    "ދިވެހިބަސް, Ελληνικά, Emiliàn e rumagnòl, English, Esperanto, " +
-    "Español, Eesti, Euskara, فارسی, Suomi, Võro, Føroyskt, Français, " +
-    "Arpetan, Furlan, Frysk, Gaeilge, 贛語, Gàidhlig, Galego, Avañe'ẽ, " +
-    "ગુજરાતી, Gaelg, עברית, हिन्दी, Fiji Hindi, Hrvatski, Kreyòl ayisyen, " +
-    "Magyar, Հայերեն, Interlingua, Bahasa Indonesia, Ilokano, Ido, " +
-    "Íslenska, Italiano, 日本語, Lojban, Basa Jawa, ქართული, Kongo, " +
-    "Kalaallisut, ಕನ್ನಡ, 한국어, Къарачай-Малкъар, Ripoarisch, Kurdî, Коми, " +
-    "Kernewek, Кыргызча, Latina, Ladino, Lëtzebuergesch, Limburgs, " +
-    "Lingála, ລາວ, Lietuvių, Latviešu, Basa Banyumasan, Malagasy, " +
-    "Македонски, മലയാളം, मराठी, Bahasa Melayu, مازِرونی, Nnapulitano, " +
-    "Nedersaksisch, नेपाल भाषा, Nederlands, ‪Norsk (nynorsk)‬, ‪Norsk (" +
-    "bokmål)‬, Nouormand, Diné bizaad, Occitan, Иронау, Papiamentu, " +
-    "Deitsch, Norfuk / Pitkern, Polski, پنجابی, پښتو, Português, Runa " +
-    "Simi, Rumantsch, Romani, Română, Русский, Саха тыла, Sardu, " +
-    "Sicilianu, Scots, Sámegiella, Simple English, Slovenčina, " +
-    "Slovenščina, Српски / Srpski, Seeltersk, Svenska, Kiswahili, தமிழ், " +
-    "తెలుగు, Тоҷикӣ, ไทย, Türkmençe, Tagalog, Türkçe, Татарча/Tatarça, " +
-    "Українська, اردو, Tiếng Việt, Volapük, Walon, Winaray, 吴语, isiXhosa, " +
-    "ייִדיש, Yorùbá, Zeêuws, 中文, Bân-lâm-gú, 粵語";
-
-client.testString(stringTest, function(err, response) {
-    assert(!err);
-    assert.equal(stringTest, response);
-});
-
-var specialCharacters = 'quote: \" backslash:' +
-    ' forwardslash-escaped: \/ ' +
-    ' backspace: \b formfeed: \f newline: \n return: \r tab: ' +
-    ' now-all-of-them-together: "\\\/\b\n\r\t' +
-    ' now-a-bunch-of-junk: !@#$%&()(&%$#{}{}<><><';
-client.testString(specialCharacters, function(err, response) {
-    assert(!err);
-    assert.equal(specialCharacters, response);
-});
-
-
-client.testByte(1, function(err, response) {
-    assert(!err);
-    assert.equal(1, response);
-});
-client.testByte(0, function(err, response) {
-    assert(!err);
-    assert.equal(0, response);
-});
-client.testByte(-1, function(err, response) {
-    assert(!err);
-    assert.equal(-1, response);
-});
-client.testByte(-127, function(err, response) {
-    assert(!err);
-    assert.equal(-127, response);
-});
-
-client.testI32(-1, function(err, response) {
-    assert(!err);
-    assert.equal(-1, response);
-});
-
-client.testI64(5, function(err, response) {
-    assert(!err);
-    assert.equal(5, response);
-});
-client.testI64(-5, function(err, response) {
-    assert(!err);
-    assert.equal(-5, response);
-});
-client.testI64(-34359738368, function(err, response) {
-    assert(!err);
-    assert.equal(-34359738368, response);
-});
-
-client.testDouble(-5.2098523, function(err, response) {
-    assert(!err);
-    assert.equal(-5.2098523, response);
-});
-client.testDouble(7.012052175215044, function(err, response) {
-    assert(!err);
-    assert.equal(7.012052175215044, response);
-});
-
-
-var out = new ttypes.Xtruct({
-    string_thing: 'Zero',
-    byte_thing: 1,
-    i32_thing: -3,
-    i64_thing: 1000000
-});
-client.testStruct(out, function(err, response) {
-    assert(!err);
-    checkRecursively(out, response);
-});
-
-
-var out2 = new ttypes.Xtruct2();
-out2.byte_thing = 1;
-out2.struct_thing = out;
-out2.i32_thing = 5;
-client.testNest(out2, function(err, response) {
-    assert(!err);
-    checkRecursively(out2, response);
-});
-
-
-var mapout = {};
-for (var i = 0; i < 5; ++i) {
-    mapout[i] = i - 10;
-}
-client.testMap(mapout, function(err, response) {
-    assert(!err);
-    assert.deepEqual(mapout, response);
-});
-
-
-var mapTestInput = {
-    "a": "123",
-    "a b": "with spaces ",
-    "same": "same",
-    "0": "numeric key",
-    "longValue": stringTest,
-    stringTest: "long key"
-};
-client.testStringMap(mapTestInput, function(err, response) {
-    assert(!err);
-    assert.deepEqual(mapTestInput, response);
-});
-
-
-var setTestInput = [1, 2, 3];
-client.testSet(setTestInput, function(err, response) {
-    assert(!err);
-    assert.deepEqual(setTestInput, response);
-});
-client.testList(setTestInput, function(err, response) {
-    assert(!err);
-    assert.deepEqual(setTestInput, response);
-});
-
-client.testEnum(ttypes.Numberz.ONE, function(err, response) {
-    assert(!err);
-    assert.equal(ttypes.Numberz.ONE, response);
-});
-
-client.testTypedef(69, function(err, response) {
-    assert(!err);
-    assert.equal(69, response);
-});
-
-
-var mapMapTest = {
-    "4": {
-        "1": 1,
-        "2": 2,
-        "3": 3,
-        "4": 4
-    },
-    "-4": {
-        "-4": -4,
-        "-3": -3,
-        "-2": -2,
-        "-1": -1
-    }
-};
-client.testMapMap(mapMapTest, function(err, response) {
-    assert(!err);
-    assert.deepEqual(mapMapTest, response);
-});
-
-var crazy = new ttypes.Insanity({
-    "userMap": {
-        "5": 5,
-        "8": 8
-    },
-    "xtructs": [new ttypes.Xtruct({
-            "string_thing": "Goodbye4",
-            "byte_thing": 4,
-            "i32_thing": 4,
-            "i64_thing": 4
-        }), new ttypes.Xtruct({
-            "string_thing": "Hello2",
-            "byte_thing": 2,
-            "i32_thing": 2,
-            "i64_thing": 2
-        })]
-});
-var insanity = {
-    "1": {
-        "2": crazy,
-        "3": crazy
-    },
-    "2": {
-        "6": {
-            "userMap": null,
-            "xtructs": null
-        }
-    }
-};
-client.testInsanity(crazy, function(err, response) {
-    assert(!err);
-    checkRecursively(insanity, response);
-});
-
-
-client.testException('TException', function(err, response) {
-    //assert(err); //BUG?
-    assert(!response);
-});
-client.testException('Xception', function(err, response) {
-    assert(!response);
-    assert.equal(err.errorCode, 1001);
-    assert.equal('Xception', err.message);
-});
-client.testException('no Exception', function(err, response) {
-    assert(!err);
-    assert.equal(undefined, response); //void
-});
-
-
-client.testOneway(1, function(err, response) {
-    assert(!response); //should not answer
-});
-
-/**
- * redo a simple test after the oneway to make sure we aren't "off by one" --
- * if the server treated oneway void like normal void, this next test will
- * fail since it will get the void confirmation rather than the correct
- * result. In this circumstance, the client will throw the exception:
- *
- *   TApplicationException: Wrong method namea
- */
-client.testI32(-1, function(err, response) {
-    assert(!err);
-    assert.equal(-1, response);
-});
-
-setTimeout(function() {
-    console.log("Server successfully tested!");
+  ThriftTestDriver(client, function (status) {
+    console.log(status);
     connection.end();
-}, 1500);
+  });
+});
 
 // to make it also run on expresso
 exports.expressoTest = function() {};
diff --git a/lib/nodejs/test/multiplex_server.js b/lib/nodejs/test/multiplex_server.js
index a2ea535..6331f6f 100644
--- a/lib/nodejs/test/multiplex_server.js
+++ b/lib/nodejs/test/multiplex_server.js
@@ -17,9 +17,6 @@
  * under the License.
  */
 var thrift = require('thrift');
-var Thrift = thrift.Thrift;
-var ThriftTransports = require('thrift/transport');
-var ThriftProtocols = require('thrift/protocol');
 
 var ThriftTest = require('./gen-nodejs/ThriftTest'),
   SecondService = require('./gen-nodejs/SecondService'),
@@ -36,25 +33,14 @@
   .option('--ssl', 'use ssl transport')
   .parse(process.argv);
 
-var protocol = undefined;
-var transport =  undefined;
-
-if (program.protocol === "binary") {
-  protocol = ThriftProtocols.TBinaryProtocol;
-} else if (program.protocol === "json") {
-  protocol = ThriftProtocols.TJSONProtocol;
-} else {
-  //default
-  protocol = ThriftProtocols.TBinaryProtocol;
+var protocol = thrift.TBinaryProtocol;
+if (program.protocol === "json") {
+  protocol = thrift.TJSONProtocol;
 }
 
+var transport =  thrift.TBufferedTransport;
 if (program.transport === "framed") {
-  transport = ThriftTransports.TFramedTransport;
-} else if (program.transport === "buffered") {
-  transport = ThriftTransports.TBufferedTransport;
-} else {
-  //default
-  transport = ThriftTransports.TBufferedTransport;
+  transport = thrift.TFramedTransport;
 }
 
 var ThriftTestHandler = require("./test_handler").ThriftTestHandler;
@@ -81,14 +67,12 @@
   protocol: protocol
 };
 
-var server = undefined;
 if (program.ssl) {
   //ssl options
-  options.key = fs.readFileSync(path.resolve(__dirname, 'server.key'));
-  options.cert = fs.readFileSync(path.resolve(__dirname, 'server.crt'));
-  server = thrift.createMultiplexSSLServer(processor, options);
-} else {
-  server = thrift.createMultiplexServer(processor, options);
+  options.tls = {
+    key: fs.readFileSync(path.resolve(__dirname, 'server.key')),
+    cert: fs.readFileSync(path.resolve(__dirname, 'server.crt'))
+  }
 }
 
-server.listen(9090);
+thrift.createMultiplexServer(processor, options).listen(9090);
diff --git a/lib/nodejs/test/server.js b/lib/nodejs/test/server.js
index acc0398..6f5abe6 100644
--- a/lib/nodejs/test/server.js
+++ b/lib/nodejs/test/server.js
@@ -25,13 +25,10 @@
 var fs = require('fs');
 var path = require('path');
 var thrift = require('thrift');
-var ThriftTransports = require('thrift/transport');
-var ThriftProtocols = require('thrift/protocol');
 var ThriftTest = require('./gen-nodejs/ThriftTest');
 var ThriftTestHandler = require('./test_handler').ThriftTestHandler;
 var ThriftTestHandlerPromise = require('./test_handler_promise').ThriftTestHandler;
 
-
 var program = require('commander');
 
 program
@@ -41,46 +38,30 @@
   .option('--promise', 'test with promise style functions')
   .parse(process.argv);
 
-var protocol = undefined;
-var transport =  undefined;
-var handler = undefined;
-
-if (program.protocol === "binary") {
-  protocol = ThriftProtocols.TBinaryProtocol;
-} else if (program.protocol === "json") {
-  protocol = ThriftProtocols.TJSONProtocol;
-} else {
-  //default
-  protocol = ThriftProtocols.TBinaryProtocol;
-}
-
+var transport =  thrift.TBufferedTransport;
 if (program.transport === "framed") {
-  transport = ThriftTransports.TFramedTransport;
-} else if (program.transport === "buffered") {
-  transport = ThriftTransports.TBufferedTransport;
-} else {
-  //default
-  transport = ThriftTransports.TBufferedTransport;
-}
+  transport = thrift.TFramedTransport;
+} 
 
+var protocol = thrift.TBinaryProtocol;
+if (program.protocol === "json") {
+  protocol = thrift.TJSONProtocol;
+} 
+
+var handler = ThriftTestHandler;
 if (program.promise) {
   handler = ThriftTestHandlerPromise;
-} else {
-  handler = ThriftTestHandler;
-}
+} 
 
 var options = {
   protocol: protocol,
   transport: transport
 };
-
 if (program.ssl) {
-  //ssl options
-  options.key = fs.readFileSync(path.resolve(__dirname, 'server.key'));
-  options.cert = fs.readFileSync(path.resolve(__dirname, 'server.crt'));
-  thrift.createSSLServer(ThriftTest, handler, options).listen(9090);
-
-} else {
-  //default
-  thrift.createServer(ThriftTest, handler, options).listen(9090);
+  options.tls = {
+    key: fs.readFileSync(path.resolve(__dirname, 'server.key')),
+    cert: fs.readFileSync(path.resolve(__dirname, 'server.crt'))
+  }
 }
+thrift.createServer(ThriftTest, handler, options).listen(9090);
+
diff --git a/lib/nodejs/test/test_handler.js b/lib/nodejs/test/test_handler.js
index 33c8941..ea1dc1d 100644
--- a/lib/nodejs/test/test_handler.js
+++ b/lib/nodejs/test/test_handler.js
@@ -21,7 +21,7 @@
 //  Apache Thrift test service.
 
 var ttypes = require('./gen-nodejs/ThriftTest_types');
-var TException = require('thrift/thrift').TException;
+var TException = require('thrift').Thrift.TException;
 
 var ThriftTestHandler = exports.ThriftTestHandler = {
   testVoid: function(result) {
diff --git a/lib/nodejs/test/test_handler_promise.js b/lib/nodejs/test/test_handler_promise.js
index fc698eb..c1561bc 100644
--- a/lib/nodejs/test/test_handler_promise.js
+++ b/lib/nodejs/test/test_handler_promise.js
@@ -21,7 +21,7 @@
 //  Apache Thrift test service.
 
 var ttypes = require('./gen-nodejs/ThriftTest_types');
-var TException = require('thrift/thrift').TException;
+var TException = require('thrift').Thrift.TException;
 
 var ThriftTestHandler = exports.ThriftTestHandler = {
   testVoid: function() {
