moved simulation logic to factory.js
web worker creation done in factory.js