Add some checks
Put final pieces in place for mpi