Added a canvas provider and clened up the code a bit