Length field now points from the smallest node; fixed a tree generation issue that newly allocated node doesn't get properly deleted