Mask mode: Code cleanup.