Added comments for my changes inline, and removed logging.