Whole bunch of miscellaneous cleanup (i.e. removing debug statements)