Refactored the code to consolidate the handling of events into a single reusable method, `HandleKillEvent`.
- Extracted shared logic into `HandleKillEvent`.
- Added dynamic adjustments for specific event types.
- Optimized structure of type detection
- Implemented cache for HTML requests
- Improved handling of 'Other' events
- Fixed a bug with renaming video files
-Enhance logic to correctly handle time-based expiration for last kill tracking for identifiying a Passenger
-PvE event detection and handling reimplemented
## Summary
- Added structured functions for better readability and maintenance.
- Improved error handling using `Write-Warning` and `Write-Error`.
- Debug handling for Write-Output in script
- Increased modularity through separate functions.
- Implemented caching to improve performance.
- Fixed multiple bugs affecting data processing.
- Add functionality to prepend new log entries to the DebugPanel
## Changes
- **Structure**: Defined functions like `Send-ApiData`, `Write-CSVData`, and `New-KillEvent`.
- **Error Handling**: Implemented comprehensive error handling.
- **Modularity**: Functions are now modular and reusable.
- **Caching**: Added caching to reduce redundant computations and enhance performance.
- **Bug Fixes**: Resolved issues with data processing. Ensuring more reliable execution.
It is now possible to record death and other fatal events by setting a slider.
The CSV structure has been changed but this updates the script automatically.
Api still only sends in case of a kill event.