Refactor canvas event handling