Split mask classes into separate module
Merge pull request #68 from ChrisBeaumont/masks

Move mask code into dedicated module