Fixed a bunch of bugs related to linking and deleting nodes