Added Viewport class, which wraps many useful canvas functions.