minor updates to tools.js to fix lint issues