Removed println statements, fixed bugs.