adding tests, fixing a small issue when removing a node