Refactor re-usable branch drawing functions