Moving out replay-specific logic from replay ninja main