cleanup of some debug code