Wrapped the PreviewCanvasHandler into a prototype class.