Updated visualization script