Identify worksheets by auto-generated ID instead of name.
Fix event handling bug.
Code cleanup & refactoring, incl. JSHint warning fixes.