Removed unused and switch the tree rlock to a lock