Actually works: simulation now continues from where it left off.

Also, some commented out debug code, should be removed on a future
commit.
Removed commented out debug code.