diff --git a/BUILD b/BUILD
index 0d3e09b..32b4c8d 100644
--- a/BUILD
+++ b/BUILD
@@ -9,37 +9,14 @@
 load("//tools/bzl:genrule2.bzl", "genrule2")
 load("//tools/bzl:js.bzl", "polygerrit_plugin")
 
-SRC = "src/main/java/com/googlesource/gerrit/plugins/reviewers/"
-
-BACKEND_SRCS = glob([
-    SRC + "common/*.java",
-    SRC + "server/*.java",
-])
-
-gerrit_plugin(
-    name = "reviewers-backend",
-    srcs = BACKEND_SRCS,
-    dir_name = "reviewers",
-    manifest_entries = [
-        # Different jar name, but use same plugin name in manifest so REST API is compatible.
-        "Gerrit-PluginName: reviewers",
-        "Gerrit-Module: com.googlesource.gerrit.plugins.reviewers.server.BackendModule",
-    ],
-    resources = glob(["src/main/resources/**/*"]),
-)
-
 gerrit_plugin(
     name = "reviewers",
-    srcs = BACKEND_SRCS + glob([
-        SRC + "*.java",
-        SRC + "client/*.java",
-    ]),
-    gwt_module = "com.googlesource.gerrit.plugins.reviewers.ReviewersForm",
+    srcs = glob(["src/main/java/**/*.java"]),
     manifest_entries = [
         "Gerrit-PluginName: reviewers",
         "Gerrit-Module: com.googlesource.gerrit.plugins.reviewers.Module",
     ],
-    resources = glob(["src/main/**/*"]),
+    resources = glob(["src/main/resources/**/*"]),
     resource_jars = [":rv-reviewers-static"],
 )
 
diff --git a/WORKSPACE b/WORKSPACE
index 5d26e17..b5382ca 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -3,7 +3,7 @@
 load("//:bazlets.bzl", "load_bazlets")
 
 load_bazlets(
-    commit = "fff6f20bb2eceaf872a8acf8ad51471c25a82d38",
+    commit = "15eae2ee5cd524a204bd62c3d59bfd0ce86916ec",
     #local_path = "/home/<user>/projects/bazlets",
 )
 
@@ -46,15 +46,9 @@
 #    "@com_googlesource_gerrit_bazlets//:gerrit_api_maven_local.bzl",
 #    "gerrit_api_maven_local",
 #)
-load(
-    "@com_googlesource_gerrit_bazlets//:gerrit_gwt.bzl",
-    "gerrit_gwt",
-)
 
 # Load release Plugin API
 gerrit_api()
 
 # Load snapshot Plugin API
 #gerrit_api_maven_local()
-
-gerrit_gwt()
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/common/Action.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/Action.java
similarity index 91%
rename from src/main/java/com/googlesource/gerrit/plugins/reviewers/common/Action.java
rename to src/main/java/com/googlesource/gerrit/plugins/reviewers/Action.java
index ebda5e1..04a15fc 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/common/Action.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewers/Action.java
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package com.googlesource.gerrit.plugins.reviewers.common;
+package com.googlesource.gerrit.plugins.reviewers;
 
 public enum Action {
   ADD,
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/AddReviewers.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/AddReviewers.java
similarity index 71%
rename from src/main/java/com/googlesource/gerrit/plugins/reviewers/server/AddReviewers.java
rename to src/main/java/com/googlesource/gerrit/plugins/reviewers/AddReviewers.java
index 54d1552..c82fa7c 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/AddReviewers.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewers/AddReviewers.java
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package com.googlesource.gerrit.plugins.reviewers.server;
+package com.googlesource.gerrit.plugins.reviewers;
 
 import com.google.common.flogger.FluentLogger;
 import com.google.gerrit.extensions.api.GerritApi;
@@ -21,15 +21,10 @@
 import com.google.gerrit.extensions.common.ChangeInfo;
 import com.google.gerrit.extensions.restapi.RestApiException;
 import com.google.gerrit.reviewdb.client.Account;
-import com.google.gerrit.reviewdb.server.ReviewDb;
 import com.google.gerrit.server.CurrentUser;
 import com.google.gerrit.server.IdentifiedUser;
 import com.google.gerrit.server.util.RequestContext;
 import com.google.gerrit.server.util.ThreadLocalRequestContext;
-import com.google.gwtorm.server.OrmException;
-import com.google.gwtorm.server.SchemaFactory;
-import com.google.inject.Provider;
-import com.google.inject.ProvisionException;
 import java.util.ArrayList;
 import java.util.Set;
 
@@ -39,21 +34,16 @@
   private final ThreadLocalRequestContext tl;
   protected final GerritApi gApi;
   protected final IdentifiedUser.GenericFactory identifiedUserFactory;
-  protected final SchemaFactory<ReviewDb> schemaFactory;
   protected final ChangeInfo changeInfo;
 
-  private ReviewDb db = null;
-
   AddReviewers(
       ThreadLocalRequestContext tl,
       GerritApi gApi,
       IdentifiedUser.GenericFactory identifiedUserFactory,
-      SchemaFactory<ReviewDb> schemaFactory,
       ChangeInfo changeInfo) {
     this.tl = tl;
     this.gApi = gApi;
     this.identifiedUserFactory = identifiedUserFactory;
-    this.schemaFactory = schemaFactory;
     this.changeInfo = changeInfo;
   }
 
@@ -67,34 +57,13 @@
 
               @Override
               public CurrentUser getUser() {
-                return identifiedUserFactory.create(new Account.Id(changeInfo.owner._accountId));
-              }
-
-              @Override
-              public Provider<ReviewDb> getReviewDbProvider() {
-                return new Provider<ReviewDb>() {
-                  @Override
-                  public ReviewDb get() {
-                    if (db == null) {
-                      try {
-                        db = schemaFactory.open();
-                      } catch (OrmException e) {
-                        throw new ProvisionException("Cannot open ReviewDb", e);
-                      }
-                    }
-                    return db;
-                  }
-                };
+                return identifiedUserFactory.create(Account.id(changeInfo.owner._accountId));
               }
             });
     try {
       addReviewers(getReviewers(), changeInfo);
     } finally {
       tl.setContext(old);
-      if (db != null) {
-        db.close();
-        db = null;
-      }
     }
   }
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/AddReviewersByConfiguration.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/AddReviewersByConfiguration.java
similarity index 84%
rename from src/main/java/com/googlesource/gerrit/plugins/reviewers/server/AddReviewersByConfiguration.java
rename to src/main/java/com/googlesource/gerrit/plugins/reviewers/AddReviewersByConfiguration.java
index 1ef93f2..6d291a4 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/AddReviewersByConfiguration.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewers/AddReviewersByConfiguration.java
@@ -12,15 +12,13 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package com.googlesource.gerrit.plugins.reviewers.server;
+package com.googlesource.gerrit.plugins.reviewers;
 
 import com.google.gerrit.extensions.api.GerritApi;
 import com.google.gerrit.extensions.common.ChangeInfo;
 import com.google.gerrit.reviewdb.client.Account;
-import com.google.gerrit.reviewdb.server.ReviewDb;
 import com.google.gerrit.server.IdentifiedUser;
 import com.google.gerrit.server.util.ThreadLocalRequestContext;
-import com.google.gwtorm.server.SchemaFactory;
 import com.google.inject.Inject;
 import com.google.inject.assistedinject.Assisted;
 import java.util.Set;
@@ -37,10 +35,9 @@
       ThreadLocalRequestContext tl,
       GerritApi gApi,
       IdentifiedUser.GenericFactory identifiedUserFactory,
-      SchemaFactory<ReviewDb> schemaFactory,
       @Assisted ChangeInfo changeInfo,
       @Assisted Set<Account.Id> reviewers) {
-    super(tl, gApi, identifiedUserFactory, schemaFactory, changeInfo);
+    super(tl, gApi, identifiedUserFactory, changeInfo);
     this.reviewers = reviewers;
   }
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/ClientModule.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/ClientModule.java
deleted file mode 100644
index bf6acbb..0000000
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/ClientModule.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (C) 2013 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.googlesource.gerrit.plugins.reviewers;
-
-import com.google.gerrit.extensions.registration.DynamicSet;
-import com.google.gerrit.extensions.webui.GwtPlugin;
-import com.google.gerrit.extensions.webui.JavaScriptPlugin;
-import com.google.gerrit.extensions.webui.TopMenu;
-import com.google.gerrit.extensions.webui.WebUiPlugin;
-import com.google.inject.AbstractModule;
-
-public class ClientModule extends AbstractModule {
-  @Override
-  protected void configure() {
-    DynamicSet.bind(binder(), TopMenu.class).to(ReviewersTopMenu.class);
-    DynamicSet.bind(binder(), WebUiPlugin.class).toInstance(new GwtPlugin("reviewers"));
-    DynamicSet.bind(binder(), WebUiPlugin.class)
-        .toInstance(new JavaScriptPlugin("rv-reviewers.html"));
-  }
-}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/GetReviewers.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/GetReviewers.java
similarity index 95%
rename from src/main/java/com/googlesource/gerrit/plugins/reviewers/server/GetReviewers.java
rename to src/main/java/com/googlesource/gerrit/plugins/reviewers/GetReviewers.java
index d8ce0ca..7ee4c83 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/GetReviewers.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewers/GetReviewers.java
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package com.googlesource.gerrit.plugins.reviewers.server;
+package com.googlesource.gerrit.plugins.reviewers;
 
 import com.google.gerrit.extensions.restapi.RestApiException;
 import com.google.gerrit.extensions.restapi.RestReadView;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/ModifyReviewersConfigCapability.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/ModifyReviewersConfigCapability.java
similarity index 93%
rename from src/main/java/com/googlesource/gerrit/plugins/reviewers/server/ModifyReviewersConfigCapability.java
rename to src/main/java/com/googlesource/gerrit/plugins/reviewers/ModifyReviewersConfigCapability.java
index b97e422..4c6cb9a 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/ModifyReviewersConfigCapability.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewers/ModifyReviewersConfigCapability.java
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package com.googlesource.gerrit.plugins.reviewers.server;
+package com.googlesource.gerrit.plugins.reviewers;
 
 import com.google.gerrit.extensions.config.CapabilityDefinition;
 
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/Module.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/Module.java
index 55b663c..efc3614 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/Module.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewers/Module.java
@@ -14,22 +14,79 @@
 
 package com.googlesource.gerrit.plugins.reviewers;
 
+import static com.google.gerrit.server.project.ProjectResource.PROJECT_KIND;
+import static com.googlesource.gerrit.plugins.reviewers.ModifyReviewersConfigCapability.MODIFY_REVIEWERS_CONFIG;
+
+import com.google.gerrit.extensions.annotations.Exports;
+import com.google.gerrit.extensions.config.CapabilityDefinition;
+import com.google.gerrit.extensions.config.FactoryModule;
+import com.google.gerrit.extensions.events.PrivateStateChangedListener;
+import com.google.gerrit.extensions.events.RevisionCreatedListener;
+import com.google.gerrit.extensions.events.WorkInProgressStateChangedListener;
+import com.google.gerrit.extensions.registration.DynamicSet;
+import com.google.gerrit.extensions.restapi.RestApiModule;
+import com.google.gerrit.extensions.webui.JavaScriptPlugin;
+import com.google.gerrit.extensions.webui.WebUiPlugin;
+import com.google.gerrit.server.change.ReviewerSuggestion;
 import com.google.inject.AbstractModule;
 import com.google.inject.Inject;
-import com.googlesource.gerrit.plugins.reviewers.server.BackendModule;
-import com.googlesource.gerrit.plugins.reviewers.server.ReviewersConfig;
 
-public class Module extends AbstractModule {
-  private final ReviewersConfig cfg;
+public class Module extends FactoryModule {
+  private final boolean enableREST;
+  private final boolean suggestOnly;
 
   @Inject
   public Module(ReviewersConfig cfg) {
-    this.cfg = cfg;
+    this(cfg.enableREST(), cfg.suggestOnly());
+  }
+
+  public Module(boolean enableREST, boolean suggestOnly) {
+    this.enableREST = enableREST;
+    this.suggestOnly = suggestOnly;
   }
 
   @Override
   protected void configure() {
-    install(new BackendModule(cfg.enableREST(), cfg.suggestOnly()));
-    install(new ClientModule());
+    bind(CapabilityDefinition.class)
+        .annotatedWith(Exports.named(MODIFY_REVIEWERS_CONFIG))
+        .to(ModifyReviewersConfigCapability.class);
+
+    if (suggestOnly) {
+      install(
+          new AbstractModule() {
+            @Override
+            protected void configure() {
+              bind(ReviewerSuggestion.class)
+                  .annotatedWith(Exports.named("reviewer-suggest"))
+                  .to(Reviewers.class);
+            }
+          });
+    } else {
+      DynamicSet.bind(binder(), RevisionCreatedListener.class).to(Reviewers.class);
+      DynamicSet.bind(binder(), WorkInProgressStateChangedListener.class).to(Reviewers.class);
+      DynamicSet.bind(binder(), PrivateStateChangedListener.class).to(Reviewers.class);
+    }
+
+    factory(AddReviewersByConfiguration.Factory.class);
+
+    if (enableREST) {
+      install(
+          new RestApiModule() {
+            @Override
+            protected void configure() {
+              get(PROJECT_KIND, "reviewers").to(GetReviewers.class);
+              put(PROJECT_KIND, "reviewers").to(PutReviewers.class);
+              get(PROJECT_KIND, "suggest_reviewers").to(SuggestProjectReviewers.class);
+            }
+          });
+    }
+    install(
+        new AbstractModule() {
+          @Override
+          protected void configure() {
+            DynamicSet.bind(binder(), WebUiPlugin.class)
+                .toInstance(new JavaScriptPlugin("rv-reviewers.html"));
+          }
+        });
   }
 }
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/PutReviewers.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/PutReviewers.java
similarity index 86%
rename from src/main/java/com/googlesource/gerrit/plugins/reviewers/server/PutReviewers.java
rename to src/main/java/com/googlesource/gerrit/plugins/reviewers/PutReviewers.java
index cc985df..5240bc8 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/PutReviewers.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewers/PutReviewers.java
@@ -12,11 +12,12 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package com.googlesource.gerrit.plugins.reviewers.server;
+package com.googlesource.gerrit.plugins.reviewers;
 
-import static com.googlesource.gerrit.plugins.reviewers.server.ModifyReviewersConfigCapability.MODIFY_REVIEWERS_CONFIG;
+import static com.googlesource.gerrit.plugins.reviewers.ModifyReviewersConfigCapability.MODIFY_REVIEWERS_CONFIG;
 
 import com.google.common.flogger.FluentLogger;
+import com.google.gerrit.exceptions.StorageException;
 import com.google.gerrit.extensions.annotations.PluginName;
 import com.google.gerrit.extensions.api.access.PluginPermission;
 import com.google.gerrit.extensions.restapi.AuthException;
@@ -25,9 +26,9 @@
 import com.google.gerrit.extensions.restapi.RestApiException;
 import com.google.gerrit.extensions.restapi.RestModifyView;
 import com.google.gerrit.extensions.restapi.UnprocessableEntityException;
-import com.google.gerrit.reviewdb.client.Account;
 import com.google.gerrit.reviewdb.client.Project;
 import com.google.gerrit.server.account.AccountResolver;
+import com.google.gerrit.server.account.AccountResolver.UnresolvableAccountException;
 import com.google.gerrit.server.git.meta.MetaDataUpdate;
 import com.google.gerrit.server.group.GroupResolver;
 import com.google.gerrit.server.permissions.PermissionBackend;
@@ -35,12 +36,10 @@
 import com.google.gerrit.server.permissions.ProjectPermission;
 import com.google.gerrit.server.project.ProjectCache;
 import com.google.gerrit.server.project.ProjectResource;
-import com.google.gwtorm.server.OrmException;
 import com.google.inject.Inject;
 import com.google.inject.Provider;
 import com.google.inject.Singleton;
-import com.googlesource.gerrit.plugins.reviewers.common.Action;
-import com.googlesource.gerrit.plugins.reviewers.server.PutReviewers.Input;
+import com.googlesource.gerrit.plugins.reviewers.PutReviewers.Input;
 import java.io.IOException;
 import java.util.List;
 import org.eclipse.jgit.errors.ConfigInvalidException;
@@ -148,15 +147,20 @@
 
   private void validateReviewer(String reviewer) throws RestApiException {
     try {
-      Account account = accountResolver.find(reviewer);
-      if (account == null) {
-        try {
-          groupResolver.get().parse(reviewer);
-        } catch (UnprocessableEntityException e) {
-          throw new ResourceNotFoundException("Account or group " + reviewer + " not found");
-        }
+      UnresolvableAccountException accountException;
+      try {
+        accountResolver.resolve(reviewer).asUnique();
+        return;
+      } catch (UnresolvableAccountException e) {
+        accountException = e;
       }
-    } catch (OrmException | IOException | ConfigInvalidException e) {
+      try {
+        groupResolver.get().parse(reviewer);
+      } catch (UnprocessableEntityException e) {
+        throw new ResourceNotFoundException(
+            "Account or group '" + reviewer + "' not found\n" + accountException.getMessage());
+      }
+    } catch (StorageException | IOException | ConfigInvalidException e) {
       logger.atSevere().log("Failed to resolve account %s", reviewer);
     }
   }
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewerFilterSection.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/ReviewerFilterSection.java
similarity index 95%
rename from src/main/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewerFilterSection.java
rename to src/main/java/com/googlesource/gerrit/plugins/reviewers/ReviewerFilterSection.java
index 7f0000a..06e7387 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewerFilterSection.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewers/ReviewerFilterSection.java
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package com.googlesource.gerrit.plugins.reviewers.server;
+package com.googlesource.gerrit.plugins.reviewers;
 
 import java.util.Objects;
 import java.util.Set;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/Reviewers.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/Reviewers.java
similarity index 92%
rename from src/main/java/com/googlesource/gerrit/plugins/reviewers/server/Reviewers.java
rename to src/main/java/com/googlesource/gerrit/plugins/reviewers/Reviewers.java
index 07a7d18..c2eae68 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/Reviewers.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewers/Reviewers.java
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package com.googlesource.gerrit.plugins.reviewers.server;
+package com.googlesource.gerrit.plugins.reviewers;
 
 import static java.util.stream.Collectors.toSet;
 
@@ -22,6 +22,7 @@
 import com.google.common.collect.ImmutableSet;
 import com.google.common.flogger.FluentLogger;
 import com.google.gerrit.common.Nullable;
+import com.google.gerrit.exceptions.StorageException;
 import com.google.gerrit.extensions.common.AccountInfo;
 import com.google.gerrit.extensions.common.ChangeInfo;
 import com.google.gerrit.extensions.events.ChangeEvent;
@@ -38,7 +39,6 @@
 import com.google.gerrit.server.git.WorkQueue;
 import com.google.gerrit.server.query.change.ChangeQueryBuilder;
 import com.google.gerrit.server.query.change.InternalChangeQuery;
-import com.google.gwtorm.server.OrmException;
 import com.google.inject.Inject;
 import com.google.inject.Provider;
 import com.google.inject.Singleton;
@@ -113,7 +113,7 @@
             .map(a -> suggestedReviewer(a))
             .collect(toSet());
       }
-    } catch (OrmException | QueryParseException x) {
+    } catch (StorageException | QueryParseException x) {
       logger.atSevere().withCause(x).log(x.getMessage());
     }
     return ImmutableSet.of();
@@ -139,7 +139,7 @@
     if (config.ignorePrivate() && (c.isPrivate != null && c.isPrivate)) {
       return;
     }
-    Project.NameKey projectName = new Project.NameKey(c.project);
+    Project.NameKey projectName = Project.nameKey(c.project);
 
     List<ReviewerFilterSection> sections = getSections(projectName);
 
@@ -163,13 +163,13 @@
       logger.atWarning().log(
           "Could not add default reviewers for change %d of project %s, filter is invalid: %s",
           changeNumber, projectName.get(), e.getMessage());
-    } catch (OrmException x) {
+    } catch (StorageException x) {
       logger.atSevere().withCause(x).log(x.getMessage());
     }
   }
 
   private Set<String> findReviewers(int change, List<ReviewerFilterSection> sections)
-      throws OrmException, QueryParseException {
+      throws StorageException, QueryParseException {
     ImmutableSet.Builder<String> reviewers = ImmutableSet.builder();
     List<ReviewerFilterSection> found = findReviewerSections(change, sections);
     for (ReviewerFilterSection s : found) {
@@ -179,7 +179,8 @@
   }
 
   private List<ReviewerFilterSection> findReviewerSections(
-      int change, List<ReviewerFilterSection> sections) throws OrmException, QueryParseException {
+      int change, List<ReviewerFilterSection> sections)
+      throws StorageException, QueryParseException {
     ImmutableList.Builder<ReviewerFilterSection> found = ImmutableList.builder();
     for (ReviewerFilterSection s : sections) {
       if (Strings.isNullOrEmpty(s.getFilter()) || s.getFilter().equals("*")) {
@@ -191,7 +192,7 @@
     return found.build();
   }
 
-  boolean filterMatch(int change, String filter) throws OrmException, QueryParseException {
+  boolean filterMatch(int change, String filter) throws StorageException, QueryParseException {
     Preconditions.checkNotNull(filter);
     ChangeQueryBuilder qb = queryBuilder.asUser(user.get());
     return !queryProvider
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersConfig.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/ReviewersConfig.java
similarity index 98%
rename from src/main/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersConfig.java
rename to src/main/java/com/googlesource/gerrit/plugins/reviewers/ReviewersConfig.java
index fe06aa3..b277d62 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersConfig.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewers/ReviewersConfig.java
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package com.googlesource.gerrit.plugins.reviewers.server;
+package com.googlesource.gerrit.plugins.reviewers;
 
 import com.google.common.base.Strings;
 import com.google.common.collect.ImmutableList;
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/ReviewersForm.gwt.xml b/src/main/java/com/googlesource/gerrit/plugins/reviewers/ReviewersForm.gwt.xml
deleted file mode 100644
index 1ea6083..0000000
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/ReviewersForm.gwt.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (C) 2014 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<module rename-to="reviewers">
-  <!-- Inherit the core Web Toolkit stuff.                        -->
-  <inherits name="com.google.gwt.user.User"/>
-  <!-- Other module inherits                                      -->
-  <inherits name="com.google.gerrit.Plugin"/>
-  <inherits name="com.google.gwt.http.HTTP"/>
-  <inherits name="com.google.gwt.json.JSON"/>
-  <inherits name="com.google.gwtexpui.globalkey.GlobalKey"/>
-  <!-- Using GWT built-in themes adds a number of static          -->
-  <!-- resources to the plugin. No theme inherits lines were      -->
-  <!-- added in order to make this plugin as simple as possible   -->
-  <!-- Specify the app entry point class.                         -->
-  <entry-point class="com.googlesource.gerrit.plugins.reviewers.client.ReviewersPlugin"/>
-  <stylesheet src="reviewers.css"/>
-</module>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersResolver.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/ReviewersResolver.java
similarity index 84%
rename from src/main/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersResolver.java
rename to src/main/java/com/googlesource/gerrit/plugins/reviewers/ReviewersResolver.java
index 10785f2..7556553 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersResolver.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewers/ReviewersResolver.java
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package com.googlesource.gerrit.plugins.reviewers.server;
+package com.googlesource.gerrit.plugins.reviewers;
 
 import static java.util.stream.Collectors.toSet;
 
@@ -20,6 +20,7 @@
 import com.google.common.collect.Sets;
 import com.google.common.flogger.FluentLogger;
 import com.google.gerrit.common.Nullable;
+import com.google.gerrit.exceptions.StorageException;
 import com.google.gerrit.extensions.common.AccountInfo;
 import com.google.gerrit.extensions.restapi.UnprocessableEntityException;
 import com.google.gerrit.reviewdb.client.Account;
@@ -28,7 +29,6 @@
 import com.google.gerrit.server.account.GroupMembers;
 import com.google.gerrit.server.group.GroupResolver;
 import com.google.gerrit.server.project.NoSuchProjectException;
-import com.google.gwtorm.server.OrmException;
 import com.google.inject.Inject;
 import com.google.inject.Provider;
 import com.google.inject.Singleton;
@@ -85,31 +85,25 @@
   private boolean resolveAccount(
       Project.NameKey project,
       int changeNumber,
-      AccountInfo uploader,
+      @Nullable AccountInfo uploader,
       Set<Account.Id> reviewers,
       String accountName) {
     try {
-      Account account = accountResolver.find(accountName);
-      if (account != null) {
-        if (account.isActive()) {
-          if (uploader == null || uploader._accountId != account.getId().get()) {
-            reviewers.add(account.getId());
-          }
+      AccountResolver.Result result = accountResolver.resolve(accountName);
+      if (result.asList().size() == 1) {
+        Account.Id id = result.asList().get(0).getAccount().getId();
+        if (uploader == null || id.get() != uploader._accountId) {
+          reviewers.add(id);
           return true;
         }
-        logger.atWarning().log(
-            "For the change %d of project %s: account %s is inactive.",
-            changeNumber, project, accountName);
       }
-    } catch (OrmException | IOException | ConfigInvalidException e) {
-      // If the account doesn't exist, find() will return null.  We only
-      // get here if something went wrong accessing the database
+      return false;
+    } catch (StorageException | IOException | ConfigInvalidException e) {
       logger.atSevere().withCause(e).log(
           "For the change %d of project %s: failed to resolve account %s.",
           changeNumber, project, accountName);
       return true;
     }
-    return false;
   }
 
   private void resolveGroup(
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/ReviewersTopMenu.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/ReviewersTopMenu.java
deleted file mode 100644
index 2c839a0..0000000
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/ReviewersTopMenu.java
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (C) 2014 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.googlesource.gerrit.plugins.reviewers;
-
-import com.google.common.collect.Lists;
-import com.google.gerrit.extensions.annotations.PluginName;
-import com.google.gerrit.extensions.client.MenuItem;
-import com.google.gerrit.extensions.webui.TopMenu;
-import com.google.inject.Inject;
-import java.util.Collections;
-import java.util.List;
-
-public class ReviewersTopMenu implements TopMenu {
-  private final List<MenuEntry> menuEntries;
-
-  @Inject
-  ReviewersTopMenu(@PluginName String pluginName) {
-    menuEntries = Lists.newArrayList();
-    menuEntries.add(
-        new MenuEntry(
-            "Projects",
-            Collections.singletonList(
-                new MenuItem("Reviewers", "#/x/" + pluginName + "/p/${projectName}", "_self"))));
-  }
-
-  @Override
-  public List<MenuEntry> getEntries() {
-    return this.menuEntries;
-  }
-}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/SuggestProjectReviewers.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/SuggestProjectReviewers.java
similarity index 87%
rename from src/main/java/com/googlesource/gerrit/plugins/reviewers/server/SuggestProjectReviewers.java
rename to src/main/java/com/googlesource/gerrit/plugins/reviewers/SuggestProjectReviewers.java
index 35619c1..5329f7c 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/SuggestProjectReviewers.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/reviewers/SuggestProjectReviewers.java
@@ -12,14 +12,14 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package com.googlesource.gerrit.plugins.reviewers.server;
+package com.googlesource.gerrit.plugins.reviewers;
 
+import com.google.gerrit.exceptions.StorageException;
 import com.google.gerrit.extensions.common.AccountVisibility;
 import com.google.gerrit.extensions.common.SuggestedReviewerInfo;
 import com.google.gerrit.extensions.restapi.BadRequestException;
 import com.google.gerrit.extensions.restapi.RestReadView;
 import com.google.gerrit.reviewdb.client.Account;
-import com.google.gerrit.reviewdb.server.ReviewDb;
 import com.google.gerrit.server.config.GerritServerConfig;
 import com.google.gerrit.server.permissions.PermissionBackend;
 import com.google.gerrit.server.permissions.PermissionBackendException;
@@ -28,9 +28,7 @@
 import com.google.gerrit.server.restapi.change.ReviewersUtil;
 import com.google.gerrit.server.restapi.change.ReviewersUtil.VisibilityControl;
 import com.google.gerrit.server.restapi.change.SuggestReviewers;
-import com.google.gwtorm.server.OrmException;
 import com.google.inject.Inject;
-import com.google.inject.Provider;
 import java.io.IOException;
 import java.util.List;
 import org.eclipse.jgit.errors.ConfigInvalidException;
@@ -43,17 +41,16 @@
   @Inject
   SuggestProjectReviewers(
       AccountVisibility av,
-      Provider<ReviewDb> dbProvider,
       @GerritServerConfig Config cfg,
       ReviewersUtil reviewersUtil,
       PermissionBackend permissionBackend) {
-    super(av, dbProvider, cfg, reviewersUtil);
+    super(av, cfg, reviewersUtil);
     this.permissionBackend = permissionBackend;
   }
 
   @Override
   public List<SuggestedReviewerInfo> apply(ProjectResource rsrc)
-      throws BadRequestException, OrmException, IOException, ConfigInvalidException,
+      throws BadRequestException, StorageException, IOException, ConfigInvalidException,
           PermissionBackendException {
     return reviewersUtil.suggestReviewers(
         null, this, rsrc.getProjectState(), getVisibility(rsrc), true);
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/client/AccountCapabilities.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/client/AccountCapabilities.java
deleted file mode 100644
index 397ffcb..0000000
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/client/AccountCapabilities.java
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (C) 2018 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.googlesource.gerrit.plugins.reviewers.client;
-
-import com.google.gerrit.plugin.client.rpc.RestApi;
-import com.google.gwt.core.client.JavaScriptObject;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-
-public class AccountCapabilities extends JavaScriptObject {
-  static String MODIFY_REVIEWERS_CONFIG = "reviewers-modifyReviewersConfig";
-
-  public static void queryPluginCapability(AsyncCallback<AccountCapabilities> cb) {
-    new RestApi("/accounts/self/capabilities").addParameter("q", MODIFY_REVIEWERS_CONFIG).get(cb);
-  }
-
-  protected AccountCapabilities() {}
-
-  public final native boolean canPerform(String name) /*-{ return this[name] ? true : false; }-*/;
-}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/client/Action.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/client/Action.java
deleted file mode 100644
index 96ebd14..0000000
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/client/Action.java
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (C) 2014 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.googlesource.gerrit.plugins.reviewers.client;
-
-public enum Action {
-  ADD,
-  REMOVE
-}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/client/ChangeReviewersInput.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/client/ChangeReviewersInput.java
deleted file mode 100644
index 9560feb..0000000
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/client/ChangeReviewersInput.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (C) 2014 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.googlesource.gerrit.plugins.reviewers.client;
-
-import com.google.gwt.core.client.JavaScriptObject;
-
-public class ChangeReviewersInput extends JavaScriptObject {
-  public static ChangeReviewersInput create() {
-    return (ChangeReviewersInput) createObject();
-  }
-
-  protected ChangeReviewersInput() {}
-
-  final void setAction(Action a) {
-    setActionRaw(a.name());
-  }
-
-  final native void setActionRaw(String a) /*-{ if(a)this.action=a; }-*/;
-
-  final native void setFilter(String f) /*-{ if(f)this.filter=f; }-*/;
-
-  final native void setReviewer(String r) /*-{ if(r)this.reviewer=r; }-*/;
-}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/client/ProjectAccessInfo.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/client/ProjectAccessInfo.java
deleted file mode 100644
index 48010ed..0000000
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/client/ProjectAccessInfo.java
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (C) 2014 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.googlesource.gerrit.plugins.reviewers.client;
-
-import com.google.gwt.core.client.JavaScriptObject;
-
-public class ProjectAccessInfo extends JavaScriptObject {
-  public final native boolean isOwner() /*-{ return this.is_owner ? true : false; }-*/;
-
-  protected ProjectAccessInfo() {}
-}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/client/ReviewerFilterSection.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/client/ReviewerFilterSection.java
deleted file mode 100644
index eed5448..0000000
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/client/ReviewerFilterSection.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (C) 2014 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.googlesource.gerrit.plugins.reviewers.client;
-
-import com.google.gwt.core.client.JavaScriptObject;
-import com.google.gwt.core.client.JsArrayString;
-
-public class ReviewerFilterSection extends JavaScriptObject {
-  public final native String filter() /*-{ return this.filter; }-*/;
-
-  public final native JsArrayString reviewers() /*-{ return this.reviewers; }-*/;
-
-  protected ReviewerFilterSection() {}
-}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/client/ReviewerSuggestOracle.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/client/ReviewerSuggestOracle.java
deleted file mode 100644
index 8bb7556..0000000
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/client/ReviewerSuggestOracle.java
+++ /dev/null
@@ -1,121 +0,0 @@
-// Copyright (C) 2016 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.googlesource.gerrit.plugins.reviewers.client;
-
-import com.google.gerrit.client.rpc.NativeMap;
-import com.google.gerrit.client.rpc.Natives;
-import com.google.gerrit.client.ui.HighlightSuggestion;
-import com.google.gerrit.plugin.client.rpc.RestApi;
-import com.google.gwt.core.client.JavaScriptObject;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.google.gwt.user.client.ui.SuggestOracle;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Set;
-
-/** A {@code SuggestOracle} for reviewers. */
-public class ReviewerSuggestOracle extends SuggestOracle {
-  private static final String ACCOUNT_KEY = "account";
-  private static final String GROUP_KEY = "group";
-  private static final String NAME_KEY = "name";
-  private static final String EMAIL_KEY = "email";
-  private static final String ACCOUNT_ID_KEY = "_account_id";
-
-  private final int chars;
-  private final String projectName;
-
-  /**
-   * @param chars minimum chars to start suggesting.
-   * @param projectName the name of the project to check visibility
-   */
-  public ReviewerSuggestOracle(int chars, String projectName) {
-    this.chars = chars;
-    this.projectName = projectName;
-  }
-
-  @Override
-  public boolean isDisplayStringHTML() {
-    return true;
-  }
-
-  private class ReviewerSuggestion extends HighlightSuggestion {
-    private final String name;
-
-    ReviewerSuggestion(String query, String groupName) {
-      super(query, groupName + " (group)");
-      this.name = groupName;
-    }
-
-    ReviewerSuggestion(String query, String fullname, String email, String accountId) {
-      super(query, fullname + ((!email.isEmpty()) ? " <" + email + ">" : " (" + accountId + ")"));
-      this.name = fullname;
-    }
-
-    @Override
-    public String getReplacementString() {
-      return name;
-    }
-  }
-
-  @Override
-  public void requestSuggestions(final Request req, final Callback done) {
-    if (req.getQuery().length() < chars) {
-      responseEmptySuggestion(req, done);
-      return;
-    }
-    RestApi rest = new RestApi("/projects/").id(projectName).view("suggest_reviewers");
-    rest.addParameter("q", req.getQuery());
-    if (req.getLimit() > 0) {
-      rest.addParameter("n", req.getLimit());
-    }
-    rest.get(
-        new AsyncCallback<NativeMap<JavaScriptObject>>() {
-          @Override
-          public void onSuccess(NativeMap<JavaScriptObject> result) {
-            List<String> keys0 = result.sortedKeys();
-            List<Suggestion> suggestions = new ArrayList<>(keys0.size());
-            for (String key0 : keys0) {
-              Set<String> keys1 = Natives.keys(result.get(key0));
-              NativeMap<JavaScriptObject> map1 = result.get(key0).cast();
-              for (String key1 : keys1) {
-                NativeMap<JavaScriptObject> map2 = map1.get(key1).cast();
-                if (ACCOUNT_KEY.equals(key1)) {
-                  String name = map2.get(NAME_KEY).toString();
-                  String email =
-                      (map2.containsKey(EMAIL_KEY)) ? map2.get(EMAIL_KEY).toString() : "";
-                  String accountId = map2.get(ACCOUNT_ID_KEY).toString();
-                  suggestions.add(new ReviewerSuggestion(req.getQuery(), name, email, accountId));
-                } else if (GROUP_KEY.equals(key1)) {
-                  String name = map2.get(NAME_KEY).toString();
-                  suggestions.add(new ReviewerSuggestion(req.getQuery(), name));
-                }
-              }
-            }
-            done.onSuggestionsReady(req, new Response(suggestions));
-          }
-
-          @Override
-          public void onFailure(Throwable caught) {
-            responseEmptySuggestion(req, done);
-          }
-        });
-  }
-
-  private static void responseEmptySuggestion(Request req, Callback done) {
-    List<Suggestion> empty = Collections.emptyList();
-    done.onSuggestionsReady(req, new Response(empty));
-  }
-}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/client/ReviewersPlugin.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/client/ReviewersPlugin.java
deleted file mode 100644
index 29aecf5..0000000
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/client/ReviewersPlugin.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright (C) 2014 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.googlesource.gerrit.plugins.reviewers.client;
-
-import com.google.gerrit.plugin.client.Plugin;
-import com.google.gerrit.plugin.client.PluginEntryPoint;
-
-public class ReviewersPlugin extends PluginEntryPoint {
-  @Override
-  public void onPluginLoad() {
-    Plugin.get().screenRegex("p/(.*)", new ReviewersScreen.Factory());
-  }
-}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/client/ReviewersScreen.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/client/ReviewersScreen.java
deleted file mode 100644
index 47bedd7..0000000
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/client/ReviewersScreen.java
+++ /dev/null
@@ -1,254 +0,0 @@
-// Copyright (C) 2014 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.googlesource.gerrit.plugins.reviewers.client;
-
-import static com.googlesource.gerrit.plugins.reviewers.client.AccountCapabilities.MODIFY_REVIEWERS_CONFIG;
-
-import com.google.gerrit.client.rpc.NativeMap;
-import com.google.gerrit.client.rpc.Natives;
-import com.google.gerrit.plugin.client.rpc.RestApi;
-import com.google.gerrit.plugin.client.screen.Screen;
-import com.google.gwt.core.client.JsArray;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.http.client.URL;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.Grid;
-import com.google.gwt.user.client.ui.HorizontalPanel;
-import com.google.gwt.user.client.ui.Image;
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.Panel;
-import com.google.gwt.user.client.ui.SuggestBox;
-import com.google.gwt.user.client.ui.VerticalPanel;
-import com.google.gwtexpui.globalkey.client.NpTextBox;
-import java.util.HashSet;
-import java.util.Objects;
-import java.util.Set;
-
-public class ReviewersScreen extends HorizontalPanel {
-  private static final String REMOVE_BUTTON_IMG = "plugins/reviewers/static/remove_reviewer.png";
-
-  static class Factory implements Screen.EntryPoint {
-    @Override
-    public void onLoad(Screen screen) {
-      screen.setPageTitle("Reviewers");
-      screen.show(new ReviewersScreen(URL.decodeQueryString(screen.getToken(1))));
-    }
-  }
-
-  private boolean isOwner;
-  private boolean hasModifyReviewersConfigCapability;
-  private String projectName;
-  private Set<ReviewerEntry> rEntries;
-
-  ReviewersScreen(String projectName) {
-    setStyleName("reviewers-panel");
-    this.projectName = projectName;
-    this.rEntries = new HashSet<>();
-
-    new RestApi("access/")
-        .addParameter("project", projectName)
-        .get(
-            new AsyncCallback<NativeMap<ProjectAccessInfo>>() {
-
-              @Override
-              public void onSuccess(NativeMap<ProjectAccessInfo> result) {
-                isOwner = result.get(projectName).isOwner();
-                if (isOwner) {
-                  display();
-                } else {
-                  // TODO(davido): Find a way to run above and below requests in parallel
-                  AccountCapabilities.queryPluginCapability(
-                      new AsyncCallback<AccountCapabilities>() {
-
-                        @Override
-                        public void onSuccess(AccountCapabilities result) {
-                          hasModifyReviewersConfigCapability =
-                              result.canPerform(MODIFY_REVIEWERS_CONFIG);
-                          display();
-                        }
-
-                        @Override
-                        public void onFailure(Throwable caught) {}
-                      });
-                }
-              }
-
-              @Override
-              public void onFailure(Throwable caught) {}
-            });
-  }
-
-  void display() {
-    new RestApi("projects")
-        .id(projectName)
-        .view("reviewers")
-        .get(
-            new AsyncCallback<JsArray<ReviewerFilterSection>>() {
-
-              @Override
-              public void onSuccess(JsArray<ReviewerFilterSection> result) {
-                display(result);
-              }
-
-              @Override
-              public void onFailure(Throwable caught) {}
-            });
-  }
-
-  void display(JsArray<ReviewerFilterSection> sections) {
-    add(createEntriesPanel(sections));
-    add(createInputPanel());
-  }
-
-  Panel createEntriesPanel(JsArray<ReviewerFilterSection> sections) {
-    Panel p = new VerticalPanel();
-    for (ReviewerFilterSection section : Natives.asList(sections)) {
-      Label filter = new Label(section.filter());
-      filter.addStyleName("reviewers-filterLabel");
-      p.add(filter);
-      for (String reviewer : Natives.asList(section.reviewers())) {
-        ReviewerEntry rEntry = new ReviewerEntry(section.filter(), reviewer);
-        rEntries.add(rEntry);
-        p.add(createOneEntry(rEntry));
-      }
-    }
-    return p;
-  }
-
-  Panel createOneEntry(final ReviewerEntry e) {
-    Label l = new Label(e.reviewer);
-    l.setStyleName("reviewers-reviewerLabel");
-
-    Image img = new Image(REMOVE_BUTTON_IMG);
-    Button removeButton = Button.wrap(img.getElement());
-    removeButton.setStyleName("reviewers-removeButton");
-    removeButton.setTitle("remove reviewer");
-    removeButton.addClickHandler(
-        new ClickHandler() {
-          @Override
-          public void onClick(final ClickEvent event) {
-            doSave(Action.REMOVE, e);
-          }
-        });
-    removeButton.setVisible(isModifiable());
-
-    HorizontalPanel p = new HorizontalPanel();
-    p.add(l);
-    p.add(removeButton);
-    return p;
-  }
-
-  Panel createInputPanel() {
-    Grid inputGrid = new Grid(2, 2);
-
-    final NpTextBox filterBox = new NpTextBox();
-    filterBox.getElement().setPropertyString("placeholder", "filter");
-    inputGrid.setText(0, 0, "Filter: ");
-    inputGrid.setWidget(0, 1, filterBox);
-
-    // TODO(davido): Remove hard coded start suggest char 3
-    final ReviewerSuggestOracle oracle = new ReviewerSuggestOracle(3, projectName);
-    final SuggestBox reviewerBox = new SuggestBox(oracle, new NpTextBox());
-    reviewerBox.getElement().setPropertyString("placeholder", "reviewer");
-    inputGrid.setText(1, 0, "Reviewer: ");
-    inputGrid.setWidget(1, 1, reviewerBox);
-
-    Button addButton = new Button("Add");
-    addButton.setStyleName("reviewers-addButton");
-    addButton.addClickHandler(
-        new ClickHandler() {
-          @Override
-          public void onClick(final ClickEvent event) {
-            ReviewerEntry e = new ReviewerEntry(filterBox.getValue(), reviewerBox.getValue());
-            if (!rEntries.contains(e) && !e.filter.isEmpty() && !e.reviewer.isEmpty()) {
-              doSave(Action.ADD, e);
-            }
-            filterBox.setText("");
-            reviewerBox.setText("");
-          }
-        });
-    filterBox.setEnabled(isModifiable());
-    reviewerBox.setEnabled(isModifiable());
-    addButton.setEnabled(isModifiable());
-
-    Panel p = new VerticalPanel();
-    p.setStyleName("reviewers-inputPanel");
-    p.add(inputGrid);
-    p.add(addButton);
-    return p;
-  }
-
-  boolean isModifiable() {
-    return isOwner || hasModifyReviewersConfigCapability;
-  }
-
-  void doSave(Action action, ReviewerEntry entry) {
-    ChangeReviewersInput in = ChangeReviewersInput.create();
-    in.setAction(action);
-    in.setFilter(entry.filter);
-    in.setReviewer(entry.reviewer);
-    reset();
-
-    new RestApi("projects")
-        .id(projectName)
-        .view("reviewers")
-        .put(
-            in,
-            new AsyncCallback<JsArray<ReviewerFilterSection>>() {
-
-              @Override
-              public void onSuccess(JsArray<ReviewerFilterSection> result) {
-                display(result);
-              }
-
-              @Override
-              public void onFailure(Throwable caught) {}
-            });
-  }
-
-  void reset() {
-    clear();
-    rEntries = new HashSet<>();
-  }
-
-  static class ReviewerEntry {
-    private String filter;
-    private String reviewer;
-
-    ReviewerEntry(String filter, String reviewer) {
-      this.filter = filter;
-      this.reviewer = reviewer;
-    }
-
-    @Override
-    public int hashCode() {
-      return Objects.hash(filter, reviewer);
-    }
-
-    @Override
-    public boolean equals(Object o) {
-      if (o == null || !(o instanceof ReviewerEntry)) {
-        return false;
-      }
-      ReviewerEntry other = (ReviewerEntry) o;
-      if (!this.filter.equals(other.filter) || !this.reviewer.equals(other.reviewer)) {
-        return false;
-      }
-      return true;
-    }
-  }
-}
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/public/reviewers.css b/src/main/java/com/googlesource/gerrit/plugins/reviewers/public/reviewers.css
deleted file mode 100644
index 8a09264..0000000
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/public/reviewers.css
+++ /dev/null
@@ -1,28 +0,0 @@
-.reviewers-panel {
-  border-spacing: 10px 10px;
-}
-
-.reviewers-addButton {
-  float: right;
-  margin-right: 5px;
-}
-
-.reviewers-inputPanel {
-  margin-left: 15px;
-}
-
-.reviewers-filterLabel {
-  font-size: 14px;
-  font-weight: bold;
-}
-
-.reviewers-reviewerLabel {
-  font-size: 14px;
-  margin-left: 15px;
-}
-
-.reviewers-removeButton {
-  margin-left: 10px;
-  vertical-align: middle;
-  cursor: pointer;
-}
\ No newline at end of file
diff --git a/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/BackendModule.java b/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/BackendModule.java
deleted file mode 100644
index fc98943..0000000
--- a/src/main/java/com/googlesource/gerrit/plugins/reviewers/server/BackendModule.java
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (C) 2018 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.googlesource.gerrit.plugins.reviewers.server;
-
-import static com.google.gerrit.server.project.ProjectResource.PROJECT_KIND;
-import static com.googlesource.gerrit.plugins.reviewers.server.ModifyReviewersConfigCapability.MODIFY_REVIEWERS_CONFIG;
-
-import com.google.gerrit.extensions.annotations.Exports;
-import com.google.gerrit.extensions.config.CapabilityDefinition;
-import com.google.gerrit.extensions.config.FactoryModule;
-import com.google.gerrit.extensions.events.PrivateStateChangedListener;
-import com.google.gerrit.extensions.events.RevisionCreatedListener;
-import com.google.gerrit.extensions.events.WorkInProgressStateChangedListener;
-import com.google.gerrit.extensions.registration.DynamicSet;
-import com.google.gerrit.extensions.restapi.RestApiModule;
-import com.google.gerrit.server.change.ReviewerSuggestion;
-import com.google.inject.AbstractModule;
-import com.google.inject.Inject;
-
-public class BackendModule extends FactoryModule {
-  private final boolean enableREST;
-  private final boolean suggestOnly;
-
-  @Inject
-  public BackendModule(ReviewersConfig cfg) {
-    this(cfg.enableREST(), cfg.suggestOnly());
-  }
-
-  public BackendModule(boolean enableREST, boolean suggestOnly) {
-    this.enableREST = enableREST;
-    this.suggestOnly = suggestOnly;
-  }
-
-  @Override
-  protected void configure() {
-    bind(CapabilityDefinition.class)
-        .annotatedWith(Exports.named(MODIFY_REVIEWERS_CONFIG))
-        .to(ModifyReviewersConfigCapability.class);
-
-    if (suggestOnly) {
-      install(
-          new AbstractModule() {
-            @Override
-            protected void configure() {
-              bind(ReviewerSuggestion.class)
-                  .annotatedWith(Exports.named("reviewer-suggest"))
-                  .to(Reviewers.class);
-            }
-          });
-    } else {
-      DynamicSet.bind(binder(), RevisionCreatedListener.class).to(Reviewers.class);
-      DynamicSet.bind(binder(), WorkInProgressStateChangedListener.class).to(Reviewers.class);
-      DynamicSet.bind(binder(), PrivateStateChangedListener.class).to(Reviewers.class);
-    }
-
-    factory(AddReviewersByConfiguration.Factory.class);
-
-    if (enableREST) {
-      install(
-          new RestApiModule() {
-            @Override
-            protected void configure() {
-              get(PROJECT_KIND, "reviewers").to(GetReviewers.class);
-              put(PROJECT_KIND, "reviewers").to(PutReviewers.class);
-              get(PROJECT_KIND, "suggest_reviewers").to(SuggestProjectReviewers.class);
-            }
-          });
-    }
-  }
-}
diff --git a/src/main/resources/Documentation/build.md b/src/main/resources/Documentation/build.md
index 6960506..de99226 100644
--- a/src/main/resources/Documentation/build.md
+++ b/src/main/resources/Documentation/build.md
@@ -58,14 +58,6 @@
   ./tools/eclipse/project.py
 ```
 
-### Backend-only
-
-There are two separate plugin targets, one containing UI components
-(`reviewers`), and one with only backend components (`reviewers-backend`). The
-UI plugin is only compatible with the GWT UI, and does not work with PolyGerrit.
-Both build instructions will work with either `reviewers` or
-`reviewers-backend`.
-
 How to build the Gerrit Plugin API is described in the [Gerrit
 documentation](../../../Documentation/dev-bazel.html#_extension_and_plugin_api_jar_files).
 
diff --git a/src/main/resources/static/remove_reviewer.png b/src/main/resources/static/remove_reviewer.png
deleted file mode 100644
index 5a3e6f0..0000000
--- a/src/main/resources/static/remove_reviewer.png
+++ /dev/null
Binary files differ
diff --git a/src/test/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersConfigIT.java b/src/test/java/com/googlesource/gerrit/plugins/reviewers/ReviewersConfigIT.java
similarity index 83%
rename from src/test/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersConfigIT.java
rename to src/test/java/com/googlesource/gerrit/plugins/reviewers/ReviewersConfigIT.java
index 32b2243..4356b90 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersConfigIT.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/reviewers/ReviewersConfigIT.java
@@ -12,21 +12,23 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package com.googlesource.gerrit.plugins.reviewers.server;
+package com.googlesource.gerrit.plugins.reviewers;
 
 import static com.google.common.truth.Truth.assertThat;
 import static com.google.gerrit.acceptance.GitUtil.fetch;
-import static com.googlesource.gerrit.plugins.reviewers.server.ReviewersConfig.FILENAME;
-import static com.googlesource.gerrit.plugins.reviewers.server.ReviewersConfig.KEY_REVIEWER;
-import static com.googlesource.gerrit.plugins.reviewers.server.ReviewersConfig.SECTION_FILTER;
+import static com.googlesource.gerrit.plugins.reviewers.ReviewersConfig.FILENAME;
+import static com.googlesource.gerrit.plugins.reviewers.ReviewersConfig.KEY_REVIEWER;
+import static com.googlesource.gerrit.plugins.reviewers.ReviewersConfig.SECTION_FILTER;
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
 import com.google.gerrit.acceptance.LightweightPluginDaemonTest;
 import com.google.gerrit.acceptance.NoHttpd;
 import com.google.gerrit.acceptance.TestPlugin;
+import com.google.gerrit.acceptance.testsuite.project.ProjectOperations;
 import com.google.gerrit.reviewdb.client.Project;
 import com.google.gerrit.reviewdb.client.RefNames;
+import com.google.inject.Inject;
 import org.eclipse.jgit.junit.TestRepository;
 import org.eclipse.jgit.lib.Config;
 import org.junit.Before;
@@ -40,6 +42,8 @@
   private static final String JANE_DOE = "jane.doe@example.com";
   private static final String JOHN_DOE = "john.doe@example.com";
 
+  @Inject private ProjectOperations projectOperations;
+
   @Before
   public void setUp() throws Exception {
     fetch(testRepo, RefNames.REFS_CONFIG + ":refs/heads/config");
@@ -53,7 +57,7 @@
     cfg.setString(SECTION_FILTER, BRANCH_MAIN, KEY_REVIEWER, JANE_DOE);
 
     pushFactory
-        .create(db, admin.getIdent(), testRepo, "Add reviewers", FILENAME, cfg.toText())
+        .create(admin.newIdent(), testRepo, "Add reviewers", FILENAME, cfg.toText())
         .to(RefNames.REFS_CONFIG)
         .assertOkStatus();
 
@@ -73,8 +77,7 @@
 
     pushFactory
         .create(
-            db,
-            admin.getIdent(),
+            admin.newIdent(),
             testRepo,
             "Add reviewers parent project",
             FILENAME,
@@ -82,7 +85,7 @@
         .to(RefNames.REFS_CONFIG)
         .assertOkStatus();
 
-    Project.NameKey childProject = createProject("child", project);
+    Project.NameKey childProject = projectOperations.newProject().parent(project).create();
     TestRepository<?> childTestRepo = cloneProject(childProject);
     fetch(childTestRepo, RefNames.REFS_CONFIG + ":refs/heads/config");
     childTestRepo.reset("refs/heads/config");
@@ -93,12 +96,7 @@
 
     pushFactory
         .create(
-            db,
-            admin.getIdent(),
-            childTestRepo,
-            "Add reviewers child project",
-            FILENAME,
-            cfg.toText())
+            admin.newIdent(), childTestRepo, "Add reviewers child project", FILENAME, cfg.toText())
         .to(RefNames.REFS_CONFIG)
         .assertOkStatus();
 
diff --git a/src/test/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersIT.java b/src/test/java/com/googlesource/gerrit/plugins/reviewers/ReviewersIT.java
similarity index 80%
rename from src/test/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersIT.java
rename to src/test/java/com/googlesource/gerrit/plugins/reviewers/ReviewersIT.java
index 5c5f478..fdc7fe4 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersIT.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/reviewers/ReviewersIT.java
@@ -12,15 +12,15 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package com.googlesource.gerrit.plugins.reviewers.server;
+package com.googlesource.gerrit.plugins.reviewers;
 
 import static com.google.common.truth.Truth.assertThat;
 import static com.google.common.truth.Truth.assert_;
 import static com.google.gerrit.acceptance.GitUtil.fetch;
 import static com.google.gerrit.extensions.client.ReviewerState.REVIEWER;
-import static com.googlesource.gerrit.plugins.reviewers.server.ReviewersConfig.FILENAME;
-import static com.googlesource.gerrit.plugins.reviewers.server.ReviewersConfig.KEY_REVIEWER;
-import static com.googlesource.gerrit.plugins.reviewers.server.ReviewersConfig.SECTION_FILTER;
+import static com.googlesource.gerrit.plugins.reviewers.ReviewersConfig.FILENAME;
+import static com.googlesource.gerrit.plugins.reviewers.ReviewersConfig.KEY_REVIEWER;
+import static com.googlesource.gerrit.plugins.reviewers.ReviewersConfig.SECTION_FILTER;
 import static java.util.stream.Collectors.toSet;
 
 import com.google.common.collect.ImmutableList;
@@ -53,10 +53,11 @@
     TestAccount user2 = accountCreator.user2();
 
     Config cfg = new Config();
-    cfg.setStringList(SECTION_FILTER, "*", KEY_REVIEWER, ImmutableList.of(user.email, user2.email));
+    cfg.setStringList(
+        SECTION_FILTER, "*", KEY_REVIEWER, ImmutableList.of(user.email(), user2.email()));
 
     pushFactory
-        .create(db, admin.getIdent(), testRepo, "Add reviewers", FILENAME, cfg.toText())
+        .create(admin.newIdent(), testRepo, "Add reviewers", FILENAME, cfg.toText())
         .to(RefNames.REFS_CONFIG)
         .assertOkStatus();
 
@@ -79,7 +80,8 @@
     } while (reviewers == null);
 
     assertThat(reviewers.stream().map(a -> a._accountId).collect(toSet()))
-        .containsExactlyElementsIn(ImmutableSet.of(admin.id.get(), user.id.get(), user2.id.get()));
+        .containsExactlyElementsIn(
+            ImmutableSet.of(admin.id().get(), user.id().get(), user2.id().get()));
   }
 
   @Test
@@ -88,11 +90,11 @@
     TestAccount user2 = accountCreator.user2();
 
     Config cfg = new Config();
-    cfg.setStringList(SECTION_FILTER, "*", KEY_REVIEWER, ImmutableList.of(user.email));
-    cfg.setStringList(SECTION_FILTER, "^a.txt", KEY_REVIEWER, ImmutableList.of(user2.email));
+    cfg.setStringList(SECTION_FILTER, "*", KEY_REVIEWER, ImmutableList.of(user.email()));
+    cfg.setStringList(SECTION_FILTER, "^a.txt", KEY_REVIEWER, ImmutableList.of(user2.email()));
 
     pushFactory
-        .create(db, admin.getIdent(), testRepo, "Add reviewers", FILENAME, cfg.toText())
+        .create(admin.newIdent(), testRepo, "Add reviewers", FILENAME, cfg.toText())
         .to(RefNames.REFS_CONFIG)
         .assertOkStatus();
 
@@ -115,7 +117,8 @@
     } while (reviewers == null);
 
     assertThat(reviewers.stream().map(a -> a._accountId).collect(toSet()))
-        .containsExactlyElementsIn(ImmutableSet.of(admin.id.get(), user.id.get(), user2.id.get()));
+        .containsExactlyElementsIn(
+            ImmutableSet.of(admin.id().get(), user.id().get(), user2.id().get()));
   }
 
   @Test
@@ -123,16 +126,16 @@
     RevCommit oldHead = getRemoteHead();
 
     Config cfg = new Config();
-    cfg.setString(SECTION_FILTER, "branch:master", KEY_REVIEWER, user.email);
+    cfg.setString(SECTION_FILTER, "branch:master", KEY_REVIEWER, user.email());
 
     pushFactory
-        .create(db, admin.getIdent(), testRepo, "Add reviewers", FILENAME, cfg.toText())
+        .create(admin.newIdent(), testRepo, "Add reviewers", FILENAME, cfg.toText())
         .to(RefNames.REFS_CONFIG)
         .assertOkStatus();
 
     testRepo.reset(oldHead);
 
-    createBranch(new Branch.NameKey(project, "other-branch"));
+    createBranch(Branch.nameKey(project, "other-branch"));
 
     // Create a change that matches the filter section.
     createChange("refs/for/master");
@@ -156,16 +159,16 @@
     RevCommit oldHead = getRemoteHead();
 
     Config cfg = new Config();
-    cfg.setString(SECTION_FILTER, "branch:other-branch", KEY_REVIEWER, user.email);
+    cfg.setString(SECTION_FILTER, "branch:other-branch", KEY_REVIEWER, user.email());
 
     pushFactory
-        .create(db, admin.getIdent(), testRepo, "Add reviewers", FILENAME, cfg.toText())
+        .create(admin.newIdent(), testRepo, "Add reviewers", FILENAME, cfg.toText())
         .to(RefNames.REFS_CONFIG)
         .assertOkStatus();
 
     testRepo.reset(oldHead);
 
-    createBranch(new Branch.NameKey(project, "other-branch"));
+    createBranch(Branch.nameKey(project, "other-branch"));
 
     // Create a change that doesn't match the filter section.
     createChange("refs/for/master");
@@ -182,6 +185,6 @@
     } while (reviewers == null && wait < 100);
 
     assertThat(reviewers.stream().map(a -> a._accountId).collect(toSet()))
-        .containsExactlyElementsIn(ImmutableSet.of(admin.id.get(), user.id.get()));
+        .containsExactlyElementsIn(ImmutableSet.of(admin.id().get(), user.id().get()));
   }
 }
diff --git a/src/test/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersResolverIT.java b/src/test/java/com/googlesource/gerrit/plugins/reviewers/ReviewersResolverIT.java
similarity index 73%
rename from src/test/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersResolverIT.java
rename to src/test/java/com/googlesource/gerrit/plugins/reviewers/ReviewersResolverIT.java
index c893a6c..185e4cd 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/reviewers/server/ReviewersResolverIT.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/reviewers/ReviewersResolverIT.java
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package com.googlesource.gerrit.plugins.reviewers.server;
+package com.googlesource.gerrit.plugins.reviewers;
 
 import static com.google.common.truth.Truth.assertThat;
 
@@ -20,6 +20,7 @@
 import com.google.gerrit.acceptance.AbstractDaemonTest;
 import com.google.gerrit.acceptance.NoHttpd;
 import com.google.gerrit.acceptance.TestAccount;
+import com.google.gerrit.acceptance.testsuite.group.GroupOperations;
 import com.google.gerrit.reviewdb.client.Account;
 import com.google.inject.Inject;
 import java.util.Collections;
@@ -30,6 +31,7 @@
 @NoHttpd
 public class ReviewersResolverIT extends AbstractDaemonTest {
 
+  @Inject private GroupOperations groupOperations;
   @Inject private ReviewersResolver resolver;
   private int change;
 
@@ -42,10 +44,10 @@
   public void testUploaderSkippedAsReviewer() throws Exception {
     Set<Account.Id> reviewers =
         resolver.resolve(
-            Collections.singleton(user.email),
+            Collections.singleton(user.email()),
             project,
             change,
-            gApi.accounts().id(user.id.get()).get());
+            gApi.accounts().id(user.id().get()).get());
     assertThat(reviewers).isEmpty();
   }
 
@@ -53,20 +55,22 @@
   public void testAccountResolve() throws Exception {
     Set<Account.Id> reviewers =
         resolver.resolve(
-            ImmutableSet.of(user.email, admin.email),
+            ImmutableSet.of(user.email(), admin.email()),
             project,
             change,
-            gApi.accounts().id(admin.id.get()).get());
-    assertThat(reviewers).containsExactly(user.id);
+            gApi.accounts().id(admin.id().get()).get());
+    assertThat(reviewers).containsExactly(user.id());
   }
 
   @Test
   public void testAccountGroupResolve() throws Exception {
-    String group1 = createGroup("group1");
+    String group1 = "group1";
+    groupOperations.newGroup().name(group1).create();
     TestAccount foo = createTestAccount("foo", group1);
     TestAccount bar = createTestAccount("bar", group1);
 
-    String group2 = createGroup("group2");
+    String group2 = "group2";
+    groupOperations.newGroup().name(group2).create();
     TestAccount baz = createTestAccount("baz", group2);
     TestAccount qux = createTestAccount("qux", group2);
 
@@ -74,11 +78,11 @@
 
     Set<Account.Id> reviewers =
         resolver.resolve(
-            ImmutableSet.of(system.email, group1, group2),
+            ImmutableSet.of(system.email(), group1, group2),
             project,
             change,
-            gApi.accounts().id(admin.id.get()).get());
-    assertThat(reviewers).containsExactly(system.id, foo.id, bar.id, baz.id, qux.id);
+            gApi.accounts().id(admin.id().get()).get());
+    assertThat(reviewers).containsExactly(system.id(), foo.id(), bar.id(), baz.id(), qux.id());
   }
 
   private TestAccount createTestAccount(String name, String group) throws Exception {
diff --git a/tools/bzl/plugin.bzl b/tools/bzl/plugin.bzl
index ea73147..4d2dbdd 100644
--- a/tools/bzl/plugin.bzl
+++ b/tools/bzl/plugin.bzl
@@ -1,12 +1,10 @@
 load(
     "@com_googlesource_gerrit_bazlets//:gerrit_plugin.bzl",
     _gerrit_plugin = "gerrit_plugin",
-    _gwt_plugin_deps = "GWT_PLUGIN_DEPS",
     _plugin_deps = "PLUGIN_DEPS",
     _plugin_test_deps = "PLUGIN_TEST_DEPS",
 )
 
 gerrit_plugin = _gerrit_plugin
-GWT_PLUGIN_DEPS = _gwt_plugin_deps
 PLUGIN_DEPS = _plugin_deps
 PLUGIN_TEST_DEPS = _plugin_test_deps
diff --git a/tools/eclipse/BUILD b/tools/eclipse/BUILD
index 77a865e..b51010e 100644
--- a/tools/eclipse/BUILD
+++ b/tools/eclipse/BUILD
@@ -1,15 +1,7 @@
 load("//tools/bzl:classpath.bzl", "classpath_collector")
-load(
-    "//tools/bzl:plugin.bzl",
-    "GWT_PLUGIN_DEPS",
-)
 
 classpath_collector(
     name = "main_classpath_collect",
     testonly = 1,
-    deps = GWT_PLUGIN_DEPS + [
-        "//external:gwt-dev",
-        "//external:gwt-user",
-        "//:reviewers__plugin_test_deps",
-    ],
+    deps = ["//:reviewers__plugin_test_deps"],
 )
