Deleted extraneous code and wrote part of the destructor.