rmv unnecessary global (redefined inside anyways)
Avoid with, use strict mode, rmv unused vars, other JSLint-inspired changes