Make masks optional.
Merge branch 'master' into empty_model_abort