TODO ==== * Make the reamining arrays vectors or smart pointers. * Memory bug when reading HDF5? x and v not allocated. * Break main() into smaller chunks; operations that are timed should become independent functions.