ENH: Restructured code to be compatible with VTKv6