Refactor all the things.
Added Id() and GetReference() node methods. Unexported more junk.