Bug fixes. Added a destroy (destructor) method