More dynamic callback system for lib/tox.js