diff --git a/src/com/android/contacts/ContactsApplicationController.java b/src/com/android/contacts/ContactsApplicationController.java
deleted file mode 100644
index 41daf26..0000000
--- a/src/com/android/contacts/ContactsApplicationController.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2010 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.contacts;
-
-/**
- * An interface that captures various top-level actions that can be performed in
- * the Contacts app.  This is a temporary class to be replaced by individual
- * listeners for various actions.
- */
-@Deprecated
-public interface ContactsApplicationController {
-
-    /**
-     * This is a temporary bridge to the ContactsListActivity indended to be used ONLY
-     * during the refactoring phase.
-     */
-    @Deprecated
-    public void onListItemClick(int position, long id);
-
-}
diff --git a/src/com/android/contacts/ContactsListActivity.java b/src/com/android/contacts/ContactsListActivity.java
index f3660fe..03bf5e7 100644
--- a/src/com/android/contacts/ContactsListActivity.java
+++ b/src/com/android/contacts/ContactsListActivity.java
@@ -24,7 +24,6 @@
 import com.android.contacts.list.ContactPickerFragment;
 import com.android.contacts.list.ContactsIntentResolver;
 import com.android.contacts.list.DefaultContactBrowseListFragment;
-import com.android.contacts.list.DefaultContactListFragment;
 import com.android.contacts.list.MultiplePhonePickerFragment;
 import com.android.contacts.list.OnContactBrowserActionListener;
 import com.android.contacts.list.OnContactPickerActionListener;
@@ -35,9 +34,7 @@
 import com.android.contacts.list.StrequentContactListFragment;
 import com.android.contacts.model.ContactsSource;
 import com.android.contacts.model.Sources;
-import com.android.contacts.ui.ContactsPreferences;
 import com.android.contacts.ui.ContactsPreferencesActivity;
-import com.android.contacts.ui.ContactsPreferencesActivity.Prefs;
 import com.android.contacts.util.AccountSelectionUtil;
 import com.android.contacts.widget.ContextMenuAdapter;
 
@@ -54,16 +51,12 @@
 import android.content.Context;
 import android.content.DialogInterface;
 import android.content.Intent;
-import android.content.SharedPreferences;
 import android.content.UriMatcher;
 import android.content.res.Resources;
-import android.database.ContentObserver;
 import android.database.Cursor;
 import android.database.MatrixCursor;
 import android.net.Uri;
 import android.os.Bundle;
-import android.os.Handler;
-import android.preference.PreferenceManager;
 import android.provider.ContactsContract;
 import android.provider.Settings;
 import android.provider.Contacts.ContactMethods;
@@ -74,7 +67,6 @@
 import android.provider.ContactsContract.Contacts;
 import android.provider.ContactsContract.Data;
 import android.provider.ContactsContract.Intents;
-import android.provider.ContactsContract.ProviderStatus;
 import android.provider.ContactsContract.RawContacts;
 import android.provider.ContactsContract.SearchSnippetColumns;
 import android.provider.ContactsContract.CommonDataKinds.Email;
@@ -92,9 +84,7 @@
 import android.view.MenuItem;
 import android.view.View;
 import android.view.ViewGroup;
-import android.view.View.OnClickListener;
 import android.widget.ArrayAdapter;
-import android.widget.Button;
 import android.widget.ListAdapter;
 import android.widget.ListView;
 import android.widget.TextView;
@@ -108,9 +98,7 @@
  * Displays a list of contacts. Usually is embedded into the ContactsActivity.
  */
 @SuppressWarnings("deprecation")
-public class ContactsListActivity extends Activity implements View.OnCreateContextMenuListener,
-        View.OnClickListener,
-        ContactsApplicationController {
+public class ContactsListActivity extends Activity implements View.OnCreateContextMenuListener {
 
     private static final String TAG = "ContactsListActivity";
 
@@ -350,11 +338,8 @@
     public int mMode = MODE_DEFAULT;
     private boolean mRunQueriesSynchronously;
     protected QueryHandler mQueryHandler;
-    private boolean mJustCreated;
-    private boolean mSyncEnabled;
     Uri mSelectedContactUri;
 
-//    private boolean mDisplayAll;
     public boolean mDisplayOnlyPhones;
 
     private String mGroupName;
@@ -420,7 +405,7 @@
     protected CallOrSmsInitiator mCallOrSmsInitiator;
 
     public ContactsListActivity() {
-        mIntentResolver = new ContactsIntentResolver(this, this);
+        mIntentResolver = new ContactsIntentResolver(this);
     }
 
     /**
@@ -434,13 +419,8 @@
     protected void onCreate(Bundle icicle) {
         super.onCreate(icicle);
 
-        mQueryHandler = new QueryHandler(this);
-        mJustCreated = true;
-        mSyncEnabled = true;
-
         // Resolve the intent
         final Intent intent = getIntent();
-
         if (!resolveIntent(intent)) {
             return;
         }
@@ -477,7 +457,6 @@
         mSearchMode = mIntentResolver.mSearchMode;
         mShowSearchSnippets = mIntentResolver.mShowSearchSnippets;
         mInitialFilter = mIntentResolver.mInitialFilter;
-        mDisplayOnlyPhones = mIntentResolver.mDisplayOnlyPhones;
         mShortcutAction = mIntentResolver.mShortcutAction;
         mSearchResultsMode = mIntentResolver.mSearchResultsMode;
         mShowNumberOfContacts = mIntentResolver.mShowNumberOfContacts;
@@ -725,10 +704,7 @@
                 break;
             }
             default: {
-                mListFragment = new DefaultContactListFragment();
-                if (!mSearchMode) {
-                    mListFragment.setSectionHeaderDisplayEnabled(true);
-                }
+                throw new UnsupportedOperationException();
             }
         }
 
@@ -740,8 +716,6 @@
             mListFragment.setPhotoLoaderEnabled(true);
         }
 
-        mListFragment.setContactsApplicationController(this);
-
         return true;
     }
 
@@ -757,11 +731,6 @@
         finish();
     }
 
-    @Deprecated
-    public void setupListView(ListAdapter adapter, ListView list) {
-        mAdapter = (ContactEntryListAdapter)adapter;
-    }
-
     public int getSummaryDisplayNameColumnIndex() {
         if (mDisplayOrder == ContactsContract.Preferences.DISPLAY_ORDER_PRIMARY) {
             return SUMMARY_DISPLAY_NAME_PRIMARY_COLUMN_INDEX;
@@ -770,29 +739,10 @@
         }
     }
 
-    /** {@inheritDoc} */
-    public void onClick(View v) {
-        int id = v.getId();
-        switch (id) {
-            // TODO a better way of identifying the button
-            case android.R.id.button1: {
-                final int position = (Integer)v.getTag();
-                Cursor c = mAdapter.getCursor();
-                if (c != null) {
-                    c.moveToPosition(position);
-                    callContact(c);
-                }
-                break;
-            }
-        }
-    }
-
     @Override
     protected void onStop() {
         super.onStop();
 
-        mAdapter.changeCursor(null);
-
         if (mMode == MODE_QUERY) {
             // Make sure the search box is closed
             SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);
@@ -1121,7 +1071,7 @@
 
             case SUBACTIVITY_DISPLAY_GROUP:
                 // Mark as just created so we re-run the view query
-                mJustCreated = true;
+//                mJustCreated = true;
                 break;
 
             case SUBACTIVITY_FILTER:
@@ -1482,11 +1432,11 @@
      * {@link #mDisplayOnlyPhones} flag.
      */
     private String getContactSelection() {
-        if (mDisplayOnlyPhones) {
-            return CLAUSE_ONLY_VISIBLE + " AND " + CLAUSE_ONLY_PHONES;
-        } else {
+//        if (mDisplayOnlyPhones) {
+//            return CLAUSE_ONLY_VISIBLE + " AND " + CLAUSE_ONLY_PHONES;
+//        } else {
             return CLAUSE_ONLY_VISIBLE;
-        }
+//        }
     }
 
     protected Uri getContactFilterUri(String filter) {
diff --git a/src/com/android/contacts/MultiplePhonePickerActivity.java b/src/com/android/contacts/MultiplePhonePickerActivity.java
index 1b7f23e..b554166 100644
--- a/src/com/android/contacts/MultiplePhonePickerActivity.java
+++ b/src/com/android/contacts/MultiplePhonePickerActivity.java
@@ -32,7 +32,6 @@
 import android.os.Handler;
 import android.os.Parcelable;
 import android.provider.ContactsContract.Intents;
-import android.provider.ContactsContract.ProviderStatus;
 import android.provider.ContactsContract.CommonDataKinds.Phone;
 import android.text.TextUtils;
 import android.util.SparseIntArray;
@@ -54,7 +53,7 @@
 /**
  * Displays of phone numbers and allows selection of multiple numbers.
  */
-public class MultiplePhonePickerActivity extends ContactsListActivity {
+public class MultiplePhonePickerActivity extends ContactsListActivity implements OnClickListener {
     /**
      * User selected phone number and id in MODE_PICK_MULTIPLE_PHONES mode.
      */
@@ -146,8 +145,6 @@
         }
     }
 
-    /** {@inheritDoc} */
-    @Override
     public void onClick(View v) {
         int id = v.getId();
         switch (id) {
diff --git a/src/com/android/contacts/list/ContactEntryListFragment.java b/src/com/android/contacts/list/ContactEntryListFragment.java
index 18a1297..e301c3d 100644
--- a/src/com/android/contacts/list/ContactEntryListFragment.java
+++ b/src/com/android/contacts/list/ContactEntryListFragment.java
@@ -19,8 +19,6 @@
 import com.android.contacts.ContactEntryListView;
 import com.android.contacts.ContactListEmptyView;
 import com.android.contacts.ContactPhotoLoader;
-import com.android.contacts.ContactsApplicationController;
-import com.android.contacts.ContactsListActivity;
 import com.android.contacts.R;
 import com.android.contacts.ui.ContactsPreferences;
 import com.android.contacts.widget.ContextMenuAdapter;
@@ -92,7 +90,6 @@
     private boolean mSearchResultsMode;
     private String mQueryString;
 
-    private ContactsApplicationController mAppController;
     private CursorLoader mLoader;
     private T mAdapter;
     private View mView;
@@ -280,16 +277,6 @@
         }
     }
 
-    @Deprecated
-    public void setContactsApplicationController(ContactsApplicationController controller) {
-        mAppController = controller;
-    }
-
-    @Deprecated
-    public ContactsApplicationController getContactsApplicationController() {
-        return mAppController;
-    }
-
     public void setContextMenuAdapter(ContextMenuAdapter adapter) {
         mContextMenuAdapter = adapter;
         if (mListView != null) {
@@ -336,7 +323,6 @@
             mAdapter.setPhotoLoader(mPhotoLoader);
         }
 
-        ((ContactsListActivity)getActivity()).setupListView(mAdapter, mListView);
         return mView;
     }
 
@@ -404,6 +390,12 @@
         mAdapter.setNameHighlightingEnabled(isNameHighlighingEnabled());
     }
 
+    @Override
+    public void onStop() {
+        super.onStop();
+        mAdapter.changeCursor(null);
+    }
+
     private boolean isNameHighlighingEnabled() {
         // When sort order and display order contradict each other, we want to
         // highlight the part of the name used for sorting.
diff --git a/src/com/android/contacts/list/ContactItemListAdapter.java b/src/com/android/contacts/list/ContactItemListAdapter.java
index aca1ac5..733edab 100644
--- a/src/com/android/contacts/list/ContactItemListAdapter.java
+++ b/src/com/android/contacts/list/ContactItemListAdapter.java
@@ -245,7 +245,7 @@
     @Override
     public View newView(Context context, Cursor cursor, ViewGroup parent) {
         final ContactListItemView view = new ContactListItemView(context, null);
-        view.setOnCallButtonClickListener(contactsListActivity);
+//        view.setOnCallButtonClickListener(contactsListActivity);
         return view;
     }
 
diff --git a/src/com/android/contacts/list/ContactsIntentResolver.java b/src/com/android/contacts/list/ContactsIntentResolver.java
index 1aec32d..888994b 100644
--- a/src/com/android/contacts/list/ContactsIntentResolver.java
+++ b/src/com/android/contacts/list/ContactsIntentResolver.java
@@ -16,7 +16,6 @@
 
 package com.android.contacts.list;
 
-import com.android.contacts.ContactsApplicationController;
 import com.android.contacts.ContactsSearchManager;
 import com.android.contacts.JoinContactActivity;
 import com.android.contacts.R;
@@ -200,11 +199,8 @@
     private static final int QUERY_MODE_MAILTO = 1;
     private static final int QUERY_MODE_TEL = 2;
 
-    private final ContactsApplicationController mAppController;
-
-    public ContactsIntentResolver(Activity context, ContactsApplicationController appController) {
+    public ContactsIntentResolver(Activity context) {
         this.mContext = context;
-        this.mAppController = appController;
     }
 
     public void setIntent(Intent intent) {
diff --git a/src/com/android/contacts/list/DefaultContactListFragment.java b/src/com/android/contacts/list/DefaultContactListFragment.java
deleted file mode 100644
index 1f02432..0000000
--- a/src/com/android/contacts/list/DefaultContactListFragment.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2010 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.contacts.list;
-
-import com.android.contacts.ContactsListActivity;
-import com.android.contacts.R;
-
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-
-/**
- * Fragment for the default contact list.
- */
-public class DefaultContactListFragment extends ContactEntryListFragment {
-
-    @Override
-    protected void onItemClick(int position, long id) {
-        // TODO instead of delegating the entire procedure to the ContactsListActivity,
-        // figure out what the specific action is and delegate the specific action.
-        getContactsApplicationController().onListItemClick(position, id);
-    }
-
-    @Override
-    protected ContactEntryListAdapter createListAdapter() {
-        ContactItemListAdapter adapter =
-                new ContactItemListAdapter((ContactsListActivity)getActivity());
-        adapter.setSectionHeaderDisplayEnabled(isSectionHeaderDisplayEnabled());
-        adapter.setDisplayPhotos(isPhotoLoaderEnabled());
-        return adapter;
-    }
-
-    @Override
-    protected View inflateView(LayoutInflater inflater, ViewGroup container) {
-        if (isSearchMode()) {
-            return inflater.inflate(R.layout.contacts_search_content, null);
-        } else if (isSearchResultsMode()) {
-            return inflater.inflate(R.layout.contacts_list_search_results, null);
-        } else {
-            return inflater.inflate(R.layout.contacts_list_content, null);
-        }
-    }
-}
