BatchWorker now works for std::map, const correctness, added main thread as a worker