Mask reading working (#41)

Mask writing, however, is failing.