Making serious headway on algorithm. Have done little commenting unfortunately and the work is pretty heady.