Refactored timescale.js to leak less into the global scope. Small scope cleanup in navMap.js