Deleting mem hierarchy in main