Use str_split rather than preg_split on maskData
Add some tests for the payload