Removed some print statements that produced incorrect output.