Added option to provide custom dividing-up-data function. Still in testing but appears to be working so far...