Cleanup debug code