Refactored timeline processing