Writing masks tested (and adding some todo...)