Cleanups of masked arrays