fixes to iterative search
building without storing trees
minor memory allocation tweaks