Added procedures for storing and restoring calculation history