Progress on sequential simulation (compiles but doesn't work).