rewrote the logic of grouting algorithm to work without key publication. Some constants still need to be tweaked and branching factors is not computed yet.