Added node.js unit tests and some touchups