larger part of tree deletion algorithm finished.