fix several warnings + add virtual destructors to base classes