moving canvas logic to class
changed deepcopy to work with singleton container to avoid circular references
using new class api