Fixed node deletion. Link deletion still needs fixing.