commented destructor, fixed some bugs