WIP: Adding support for mask type