Added debug and new printouts.