Create new (documented) version of mask creation code.