Refactor and accelerate the cut-flow collection functions, which should be about a factor 3 times faster now.