Made node.js friendly and made a node example (also cleaned up indents)