restructure plugin; add "destroy"