Gradually moving some functions to an iterable class for convenience and performance. It would be possible to solve the current performance issue with extra parameters, but that would become unwieldy.