Tree-making, histo-making, and limit code for July 18 ttV talk