Added aperture capability with better Mask handling