Added recursive mechanism for leaf removed and added events