Add some leaf deletion handling
Fix some borrow bugs