Moved canvas stuff to a separate module