Fixed a bug and added a test for removing keys that are not in the tree.