Huge refactoring... now all processes are running using queue.