Pushed the canvas/context into the rendering code.
Functional refactor complete.