divided canvas.py into separated modules