Remove much of the debug only code Add command line flag to control the amount of logging done to the screen