Better array cleaning