Turn branch_controller into a not black box