added MPI and serial writing, and cleaned up hdf5
hdf5 can now be restarted in parallel and replay batch history added back in