added deconstructors
added comments to code