Add masks support.

Starts fixing #4.
Masks support for LIST.