Initial version of offscreen canvas, performance is most excellent
Refactoring and code cleanup