fix: adding virtual destructors to base classes

This addresses the memory leak reports in issue #16