remove Branch struct, unify reference iterators