Make node merging work...I think.
Finish adding merging tests + fix a few bugs.