Refactoring + Adding MPI_Comm_rank declaration and call