Cleans up the algorithm so that every mathematical possibility will be
systematically included, which includes removing the -limit option. Also added a
"result count" at the bottom of the output.