fixing up some code for the node examples

I haven't run em yet, just opening this for ref for now!