Clean up tools.js