Added tree deletion and fast exponentiation