Added destructor and comments