Completely finished the final configuration generation, plugging in the candy algorithm. It seems to work: the JSON output looks fine.