Refactor canvas module a bit
Merge pull request #20 from agudulin/bugfix

Refactor canvas module a bit