re-added queue to fix long-running tasks

prior scheme was calling process.exit() prematurely. also changed
socket.io messaging a bit.