Added monte_carlo implementation with threading support. Also updated commThread to support multiple threads per node