Refactored some of the architecture concerning masks
Merge branch 'master'
Improved control of sprite masks; associate MaskShape with Sprite.
Various changes for consistency
Merge