Canvaslayer rewritten