Merge task codes into main.js
Refactoring
Random walk agent

TODO: race conditions for states and agent calls

The states pushed into the queue is frequently different current states