Added deconstructors to delete objects at end of run and stdio.h includes needed on mhg.