Have some way of printing out each phase of the algorithm for debugging purposes.