cleaned up RBT_implementation.c further