added include/exclude properties on mask, implement data_valid

all in the title, for now.  see commit msgs for more info