Changed to output byte datatype for mask for smaller file size. Also did a few other minor under the hood kind of things. Should have been doing this on the develop branch but I forgot. Oops.