Rewrite hub.js and add task dependencies.