#84 Turn TreeNodeRef into a long

These accounted for ~10% of our garbage.