Adding support for arbitrary masks and formats that have masked characters
Clean up