cleanup some if($debug) directives