ENH: Add VTK 6 support 2/2

Issue #3514
BUG: Fix memory leaks and uninitialized variables