Finished converting insert to the new branching method