diff --git a/src/com/android/launcher3/allapps/search/AllAppsSearchBarController.java b/src/com/android/launcher3/allapps/search/AllAppsSearchBarController.java
index 547d9e1..63aa7be 100644
--- a/src/com/android/launcher3/allapps/search/AllAppsSearchBarController.java
+++ b/src/com/android/launcher3/allapps/search/AllAppsSearchBarController.java
@@ -31,7 +31,6 @@
 import com.android.launcher3.ExtendedEditText;
 import com.android.launcher3.Launcher;
 import com.android.launcher3.Utilities;
-import com.android.launcher3.allapps.AlphabeticalAppsList;
 import com.android.launcher3.discovery.AppDiscoveryItem;
 import com.android.launcher3.discovery.AppDiscoveryUpdateState;
 import com.android.launcher3.util.ComponentKey;
@@ -46,12 +45,11 @@
         implements TextWatcher, OnEditorActionListener, ExtendedEditText.OnBackKeyListener {
 
     protected Launcher mLauncher;
-    protected AlphabeticalAppsList mApps;
     protected Callbacks mCb;
     protected ExtendedEditText mInput;
     protected String mQuery;
 
-    protected DefaultAppSearchAlgorithm mSearchAlgorithm;
+    protected SearchAlgorithm mSearchAlgorithm;
     protected InputMethodManager mInputMethodManager;
 
     public void setVisibility(int visibility) {
@@ -61,9 +59,8 @@
      * Sets the references to the apps model and the search result callback.
      */
     public final void initialize(
-            AlphabeticalAppsList apps, ExtendedEditText input,
+            SearchAlgorithm searchAlgorithm, ExtendedEditText input,
             Launcher launcher, Callbacks cb) {
-        mApps = apps;
         mCb = cb;
         mLauncher = launcher;
 
@@ -75,22 +72,7 @@
         mInputMethodManager = (InputMethodManager)
                 mInput.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
 
-        mSearchAlgorithm = onInitializeSearch();
-
-        onInitialized();
-    }
-
-    /**
-     * You can override this method to perform custom initialization.
-     */
-    protected void onInitialized() {
-    }
-
-    /**
-     * This method will get called when the controller is set.
-     */
-    public DefaultAppSearchAlgorithm onInitializeSearch() {
-        return new DefaultAppSearchAlgorithm(mApps.getApps());
+        mSearchAlgorithm = searchAlgorithm;
     }
 
     @Override
diff --git a/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java b/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java
index 126a02c..cb3b066 100644
--- a/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java
+++ b/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java
@@ -118,8 +118,8 @@
         mAppsRecyclerView = recyclerView;
         mAppsRecyclerView.addOnScrollListener(mElevationController);
         mAdapter = (AllAppsGridAdapter) mAppsRecyclerView.getAdapter();
-
-        mSearchBarController.initialize(appsList, mSearchInput, mLauncher, this);
+        mSearchBarController.initialize(
+                new DefaultAppSearchAlgorithm(appsList.getApps()), mSearchInput, mLauncher, this);
     }
 
     @Override
diff --git a/src/com/android/launcher3/allapps/search/DefaultAppSearchAlgorithm.java b/src/com/android/launcher3/allapps/search/DefaultAppSearchAlgorithm.java
index 06097d0..8a0fd46 100644
--- a/src/com/android/launcher3/allapps/search/DefaultAppSearchAlgorithm.java
+++ b/src/com/android/launcher3/allapps/search/DefaultAppSearchAlgorithm.java
@@ -26,7 +26,7 @@
 /**
  * The default search implementation.
  */
-public class DefaultAppSearchAlgorithm {
+public class DefaultAppSearchAlgorithm implements SearchAlgorithm {
 
     private final List<AppInfo> mApps;
     protected final Handler mResultHandler;
@@ -36,12 +36,14 @@
         mResultHandler = new Handler();
     }
 
+    @Override
     public void cancel(boolean interruptActiveRequests) {
         if (interruptActiveRequests) {
             mResultHandler.removeCallbacksAndMessages(null);
         }
     }
 
+    @Override
     public void doSearch(final String query,
             final AllAppsSearchBarController.Callbacks callback) {
         final ArrayList<ComponentKey> result = getTitleMatchResult(query);
@@ -54,7 +56,7 @@
         });
     }
 
-    public ArrayList<ComponentKey> getTitleMatchResult(String query) {
+    private ArrayList<ComponentKey> getTitleMatchResult(String query) {
         // Do an intersection of the words in the query and each title, and filter out all the
         // apps that don't match all of the words in the query.
         final String queryTextLower = query.toLowerCase();
@@ -67,7 +69,7 @@
         return result;
     }
 
-    public boolean matches(AppInfo info, String query) {
+    public static boolean matches(AppInfo info, String query) {
         int queryLength = query.length();
 
         String title = info.title.toString();
@@ -103,7 +105,7 @@
      *      3) Any capital character after a digit or small character
      *      4) Any capital character before a small character
      */
-    protected boolean isBreak(int thisType, int prevType, int nextType) {
+    private static boolean isBreak(int thisType, int prevType, int nextType) {
         switch (thisType) {
             case Character.UPPERCASE_LETTER:
                 if (nextType == Character.UPPERCASE_LETTER) {
diff --git a/src/com/android/launcher3/allapps/search/SearchAlgorithm.java b/src/com/android/launcher3/allapps/search/SearchAlgorithm.java
new file mode 100644
index 0000000..c409b1c
--- /dev/null
+++ b/src/com/android/launcher3/allapps/search/SearchAlgorithm.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2017 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.android.launcher3.allapps.search;
+
+/**
+ * An interface for handling search.
+ */
+public interface SearchAlgorithm {
+
+    /**
+     * Performs search and sends the result to the callback.
+     */
+    void doSearch(String query, AllAppsSearchBarController.Callbacks callback);
+
+    /**
+     * Cancels any active request.
+     */
+    void cancel(boolean interruptActiveRequests);
+}
