hThreadPool now uses std::queue, MapReduce can handle one batch, minor fixes