Get branches enhancement

Updates the experimental get_branches_enhancement branch (until maybe one day it gets merged into master).