minor tweaks, templatized branchop