Refactor Canvas and Geometry