cleanup of debug code