Removing debug and removing unused variable
More output control. Formatting and cleaning up a bit.