Still working on the head-corner algorithm.