create_branch: move msg setup closer to point of use