Fix resource loading bug, wikilink deserialization bug, and output formatting bugs.

Also add logic to avoid querying on "NIL" node id's.