Added virtual destructors to virtual classes.