Remove nodes-specific code

And add a chunk of documentation, and some minor bug fixes.