Add mask support to shared utility code.
Add support for running module directly.
Implement functionality needed for current run.