Added deconstructor and finished problem 1.16