Move this var definition to top of module. In general, var definitions should come before functions (may want to move `function canonicalize()` down).