Some minor refactoring for the unique run ID.