Refactor vectorstorer plugin (draft)