Update edit mode js, grab undefined variables off of window rather than traversing up the stack.

I changed `areaHandle` to `handle` to match the way we store properties, changed `.attr('data-...')` to `.data('...')` and added window to all of the global properties so that we don't have to bubble up the stack.