Move canvas grouping logic to separate mixin/file