diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 9242b1b..5735306 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -267,7 +267,8 @@
             android:name=".ui.QuickContactActivity"
             android:theme="@style/FullyTranslucent.QuickContact"
             android:launchMode="singleTop"
-            android:taskAffinity="android.task.fasttrack">
+            android:excludeFromRecents="true"
+            android:taskAffinity="android.task.quickcontact">
 
             <intent-filter>
                 <action android:name="com.android.contacts.action.QUICK_CONTACT" />
diff --git a/res/drawable-hdpi-finger/divider_dark_opaque.9.png b/res/drawable-hdpi-finger/divider_dark_opaque.9.png
deleted file mode 100644
index 9444f0d..0000000
--- a/res/drawable-hdpi-finger/divider_dark_opaque.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi-finger/infobar_dark.9.png b/res/drawable-hdpi-finger/infobar_dark.9.png
index be0085a..105f6d0 100644
--- a/res/drawable-hdpi-finger/infobar_dark.9.png
+++ b/res/drawable-hdpi-finger/infobar_dark.9.png
Binary files differ
diff --git a/res/drawable-hdpi-finger/section_dark.9.png b/res/drawable-hdpi-finger/section_dark.9.png
deleted file mode 100644
index 5a865fa..0000000
--- a/res/drawable-hdpi-finger/section_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_launcher_contacts.png b/res/drawable-hdpi/ic_launcher_contacts.png
index be57b4a..69a72c4 100644
--- a/res/drawable-hdpi/ic_launcher_contacts.png
+++ b/res/drawable-hdpi/ic_launcher_contacts.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/divider_dark_opaque.9.png b/res/drawable-mdpi-finger/divider_dark_opaque.9.png
deleted file mode 100644
index 9444f0d..0000000
--- a/res/drawable-mdpi-finger/divider_dark_opaque.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi-finger/infobar_dark.9.png b/res/drawable-mdpi-finger/infobar_dark.9.png
index a3f3b01..45b2dcb 100644
--- a/res/drawable-mdpi-finger/infobar_dark.9.png
+++ b/res/drawable-mdpi-finger/infobar_dark.9.png
Binary files differ
diff --git a/res/drawable-mdpi-finger/section_dark.9.png b/res/drawable-mdpi-finger/section_dark.9.png
deleted file mode 100644
index dbf6ded..0000000
--- a/res/drawable-mdpi-finger/section_dark.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_launcher_contacts.png b/res/drawable-mdpi/ic_launcher_contacts.png
new file mode 100644
index 0000000..08468fd
--- /dev/null
+++ b/res/drawable-mdpi/ic_launcher_contacts.png
Binary files differ
diff --git a/res/drawable/ic_launcher_contacts.png b/res/drawable/ic_launcher_contacts.png
deleted file mode 100644
index 826656f..0000000
--- a/res/drawable/ic_launcher_contacts.png
+++ /dev/null
Binary files differ
diff --git a/res/layout-finger/contacts_list_item_photo.xml b/res/layout-finger/contacts_list_item_photo.xml
index bd3baf8..b7fcd7a 100644
--- a/res/layout-finger/contacts_list_item_photo.xml
+++ b/res/layout-finger/contacts_list_item_photo.xml
@@ -140,6 +140,6 @@
     <View android:id="@+id/list_divider"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
-        android:background="@drawable/divider_dark_opaque"
+        android:background="@*android:drawable/divider_horizontal_dark_opaque"
     />
 </LinearLayout>
diff --git a/res/layout-finger/list_section.xml b/res/layout-finger/list_section.xml
index b91d213..06a9ffe 100644
--- a/res/layout-finger/list_section.xml
+++ b/res/layout-finger/list_section.xml
@@ -19,7 +19,7 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="fill_parent"
     android:layout_height="25dip"
-    android:background="@drawable/section_dark"
+    android:background="@*android:drawable/dark_header"
     >
     <TextView
         android:id="@+id/header_text"
@@ -28,14 +28,8 @@
         android:layout_centerVertical="true"
         android:layout_alignParentLeft="true"
         android:textStyle="bold"
-        android:textColor="#ffbfbfbf"
+        android:textColor="@*android:color/dim_foreground_dark"
         android:textSize="14sp"
         android:gravity="center"
     />
-    <View
-        android:layout_width="fill_parent"
-        android:layout_height="1dip"
-        android:layout_alignParentBottom="true"
-        android:background="@drawable/divider_dark_opaque"
-    />
 </RelativeLayout>
diff --git a/src/com/android/contacts/AttachImage.java b/src/com/android/contacts/AttachImage.java
index c8b6322..6970842 100644
--- a/src/com/android/contacts/AttachImage.java
+++ b/src/com/android/contacts/AttachImage.java
@@ -59,7 +59,7 @@
 
     }
 
-    private Long[] rawContactIds;
+    private Long[] mRawContactIds;
 
     private ContentResolver mContentResolver;
 
@@ -68,7 +68,7 @@
         super.onCreate(icicle);
 
         if (icicle != null) {
-            rawContactIds = toClassArray(icicle.getLongArray(RAW_CONTACT_URIS_KEY));
+            mRawContactIds = toClassArray(icicle.getLongArray(RAW_CONTACT_URIS_KEY));
         } else {
             Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
             intent.setType(Contacts.CONTENT_ITEM_TYPE);
@@ -82,12 +82,15 @@
     protected void onSaveInstanceState(Bundle outState) {
         super.onSaveInstanceState(outState);
 
-        if (rawContactIds != null && rawContactIds.length != 0) {
-            outState.putLongArray(RAW_CONTACT_URIS_KEY, toPrimativeArray(rawContactIds));
+        if (mRawContactIds != null && mRawContactIds.length != 0) {
+            outState.putLongArray(RAW_CONTACT_URIS_KEY, toPrimativeArray(mRawContactIds));
         }
     }
 
     private static long[] toPrimativeArray(Long[] in) {
+        if (in == null) {
+            return null;
+        }
         long[] out = new long[in.length];
         for (int i = 0; i < in.length; i++) {
             out[i] = in[i];
@@ -96,6 +99,9 @@
     }
 
     private static Long[] toClassArray(long[] in) {
+        if (in == null) {
+            return null;
+        }
         Long[] out = new Long[in.length];
         for (int i = 0; i < in.length; i++) {
             out[i] = in[i];
@@ -130,15 +136,15 @@
             final long contactId = ContentUris.parseId(result.getData());
             final ArrayList<Long> rawContactIdsList = ContactsUtils.queryForAllRawContactIds(
                     mContentResolver, contactId);
-            rawContactIds = new Long[rawContactIdsList.size()];
-            rawContactIds = rawContactIdsList.toArray(rawContactIds);
+            mRawContactIds = new Long[rawContactIdsList.size()];
+            mRawContactIds = rawContactIdsList.toArray(mRawContactIds);
 
-            if (rawContactIds == null || rawContactIdsList.isEmpty()) {
+            if (mRawContactIds == null || rawContactIdsList.isEmpty()) {
                 Toast.makeText(this, R.string.contactSavedErrorToast, Toast.LENGTH_LONG).show();
             }
         } else if (requestCode == REQUEST_CROP_PHOTO) {
             final Bundle extras = result.getExtras();
-            if (extras != null) {
+            if (extras != null && mRawContactIds != null) {
                 Bitmap photo = extras.getParcelable("data");
                 if (photo != null) {
                     ByteArrayOutputStream stream = new ByteArrayOutputStream();
@@ -149,7 +155,7 @@
                     imageValues.put(RawContacts.Data.IS_SUPER_PRIMARY, 1);
 
                     // attach the photo to every raw contact
-                    for (Long rawContactId : rawContactIds) {
+                    for (Long rawContactId : mRawContactIds) {
 
                         // exchange and google only allow one image, so do an update rather than insert
                         boolean shouldUpdate = false;
diff --git a/src/com/android/contacts/ContactsListActivity.java b/src/com/android/contacts/ContactsListActivity.java
index 4125d7a..c4ef60f 100644
--- a/src/com/android/contacts/ContactsListActivity.java
+++ b/src/com/android/contacts/ContactsListActivity.java
@@ -395,14 +395,8 @@
     }
 
     private class DeleteClickListener implements DialogInterface.OnClickListener {
-        private Uri mUri;
-
-        public DeleteClickListener(Uri uri) {
-            mUri = uri;
-        }
-
         public void onClick(DialogInterface dialog, int which) {
-            getContentResolver().delete(mUri, null, null);
+            getContentResolver().delete(mSelectedContactUri, null, null);
         }
     }
 
@@ -880,7 +874,7 @@
                         .setMessage(R.string.deleteConfirmation)
                         .setNegativeButton(android.R.string.cancel, null)
                         .setPositiveButton(android.R.string.ok,
-                                new DeleteClickListener(mSelectedContactUri)).create();
+                                new DeleteClickListener()).create();
             }
             case R.id.dialog_readonly_contact_hide_confirmation: {
                 return new AlertDialog.Builder(this)
@@ -889,7 +883,7 @@
                         .setMessage(R.string.readOnlyContactWarning)
                         .setNegativeButton(android.R.string.cancel, null)
                         .setPositiveButton(android.R.string.ok,
-                                new DeleteClickListener(mSelectedContactUri)).create();
+                                new DeleteClickListener()).create();
             }
             case R.id.dialog_readonly_contact_delete_confirmation: {
                 return new AlertDialog.Builder(this)
@@ -898,7 +892,7 @@
                         .setMessage(R.string.readOnlyContactDeleteConfirmation)
                         .setNegativeButton(android.R.string.cancel, null)
                         .setPositiveButton(android.R.string.ok,
-                                new DeleteClickListener(mSelectedContactUri)).create();
+                                new DeleteClickListener()).create();
             }
             case R.id.dialog_multiple_contact_delete_confirmation: {
                 return new AlertDialog.Builder(this)
@@ -907,7 +901,7 @@
                         .setMessage(R.string.multipleContactDeleteConfirmation)
                         .setNegativeButton(android.R.string.cancel, null)
                         .setPositiveButton(android.R.string.ok,
-                                new DeleteClickListener(mSelectedContactUri)).create();
+                                new DeleteClickListener()).create();
             }
         }
         return super.onCreateDialog(id);
@@ -1148,39 +1142,39 @@
      */
     protected void doContactDelete() {
         mReadOnlySourcesCnt = 0;
-	mWritableSourcesCnt = 0;
+        mWritableSourcesCnt = 0;
         mWritableRawContactIds.clear();
 
-	if (mSelectedContactUri != null) {
-            Cursor c = getContentResolver().query(RawContacts.CONTENT_URI,
-	            RAW_CONTACTS_PROJECTION, RawContacts.CONTACT_ID + "="
-		    + ContentUris.parseId(mSelectedContactUri), null, null);
+        if (mSelectedContactUri != null) {
+            Cursor c = getContentResolver().query(RawContacts.CONTENT_URI, RAW_CONTACTS_PROJECTION,
+                    RawContacts.CONTACT_ID + "=" + ContentUris.parseId(mSelectedContactUri), null,
+                    null);
             Sources sources = Sources.getInstance(ContactsListActivity.this);
             if (c != null) {
                 while (c.moveToNext()) {
                     final String accountType = c.getString(2);
-		    final long rawContactId = c.getLong(0);
+                    final long rawContactId = c.getLong(0);
                     ContactsSource contactsSource = sources.getInflatedSource(accountType,
                             ContactsSource.LEVEL_SUMMARY);
                     if (contactsSource != null && contactsSource.readOnly) {
                         mReadOnlySourcesCnt += 1;
                     } else {
                         mWritableSourcesCnt += 1;
-			mWritableRawContactIds.add(rawContactId);
-		    }
-                 }
+                        mWritableRawContactIds.add(rawContactId);
+                    }
+                }
             }
             c.close();
-	    if (mReadOnlySourcesCnt > 0 && mWritableSourcesCnt > 0) {
-	        showDialog(R.id.dialog_readonly_contact_delete_confirmation);
-	    } else if (mReadOnlySourcesCnt > 0 && mWritableSourcesCnt == 0) {
-	        showDialog(R.id.dialog_readonly_contact_hide_confirmation);
-	    } else if (mReadOnlySourcesCnt == 0 && mWritableSourcesCnt > 1) {
-	        showDialog(R.id.dialog_multiple_contact_delete_confirmation);
+            if (mReadOnlySourcesCnt > 0 && mWritableSourcesCnt > 0) {
+                showDialog(R.id.dialog_readonly_contact_delete_confirmation);
+            } else if (mReadOnlySourcesCnt > 0 && mWritableSourcesCnt == 0) {
+                showDialog(R.id.dialog_readonly_contact_hide_confirmation);
+            } else if (mReadOnlySourcesCnt == 0 && mWritableSourcesCnt > 1) {
+                showDialog(R.id.dialog_multiple_contact_delete_confirmation);
             } else {
-	        showDialog(R.id.dialog_delete_contact_confirmation);
-	    }
-	}
+                showDialog(R.id.dialog_delete_contact_confirmation);
+            }
+        }
     }
 
     @Override
diff --git a/src/com/android/contacts/ui/QuickContactActivity.java b/src/com/android/contacts/ui/QuickContactActivity.java
index 86dca28..6445664 100644
--- a/src/com/android/contacts/ui/QuickContactActivity.java
+++ b/src/com/android/contacts/ui/QuickContactActivity.java
@@ -31,7 +31,7 @@
  */
 public final class QuickContactActivity extends Activity implements
         QuickContactWindow.OnDismissListener {
-    private static final String TAG = "FastTrackActivity";
+    private static final String TAG = "QuickContactActivity";
 
     static final boolean LOGV = true;
     static final boolean FORCE_CREATE = false;
