Wrote the bulk of the branching section.