refactored vdev related changes