Refactor of canvas JS into OO class structure.