Added caching of the distribution, converted retesting into a while loop
instead of a recursive call and added an option to set the blocksize for the
local test implementation in main.c