[TASK] Cleanup functionality in PackageManager.php