Major cleanup of output of script.