minor refactoring - we are now using the upperLeftSquareMask
moving the "debug" and "toDot" functionality to traits that can be stacked