Ability to draw on canvas in Firefox + refactoring