Reformatted to work with new Node library