cleaning things up for canvas and webgl