Added virtual dtors where needed. Resolves issue #4.