The algorithm now stops iterating to a higher cut-off if there's less time remaining than it just spend on the previous iteration.
Fixed bug in one of the print statements. Touched up all print statements non-platform-specific formatting.