Refactor some logic from canvas and object classes into mixins
More canvas refactoring