Added "destroy", fixed some bugs