Added random state saving scripts.