Refactor of MPI Pi Example