Plugin-side cleanup