CORE-4841: some refactoring in preparation for obtaining app rerun information