Cleaning up, refactor Canvas.js