diff --git a/res/values/strings.xml b/res/values/strings.xml
index f26dfc8..a8a9969 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -79,9 +79,13 @@
 
     <!-- External-drop widget pick label format string [CHAR_LIMIT=25] -->
     <string name="external_drop_widget_pick_format" translatable="false">%1$s (%2$d x %3$d)</string>
-    <!-- External-drop widget error string -->
-    <string name="external_drop_widget_error">Could not install clipboard item</string>
-    <!-- External-drop widget pick title -->
+    <!-- External-drop widget error string.  This is the error that is shown
+         when you drag and item into the homescreen and it is unable to fit,
+         or an error is encountered. [CHAR_LIMIT=50] -->
+    <string name="external_drop_widget_error">Could not drop item onto this homescreen</string>
+    <!-- External-drop widget pick title.  This is shown as the title of the
+         dialog which allows you to pick which widgets to handle a particular
+         drop if there are multiple choices. [CHAR_LIMIT=35] -->
     <string name="external_drop_widget_pick_title">Select widget to create</string>
 
     <!-- Folders -->
diff --git a/src/com/android/launcher2/BubbleTextView.java b/src/com/android/launcher2/BubbleTextView.java
index 076f574..f4a3d44 100644
--- a/src/com/android/launcher2/BubbleTextView.java
+++ b/src/com/android/launcher2/BubbleTextView.java
@@ -39,6 +39,7 @@
 
     private final RectF mRect = new RectF();
     private Paint mPaint;
+    private int mPrevAlpha = -1;
 
     private boolean mBackgroundSizeChanged;
     private Drawable mBackground;
@@ -147,7 +148,11 @@
 
     @Override
     protected boolean onSetAlpha(int alpha) {
-        mPaint.setAlpha(alpha);
-        return super.onSetAlpha(alpha);
+        if (mPrevAlpha != alpha) {
+            mPrevAlpha = alpha;
+            mPaint.setAlpha(alpha);
+            super.onSetAlpha(alpha);
+        }
+        return true;
     }
 }
diff --git a/src/com/android/launcher2/CustomizePagedView.java b/src/com/android/launcher2/CustomizePagedView.java
index 1763a00..a0e3528 100644
--- a/src/com/android/launcher2/CustomizePagedView.java
+++ b/src/com/android/launcher2/CustomizePagedView.java
@@ -303,9 +303,10 @@
 
     @Override
     public void onClick(View v) {
-        if (!v.isInTouchMode()) {
-            return;
-        }
+        // Return early if this is not initiated from a touch
+        if (!v.isInTouchMode()) return;
+        // Return early if we are still animating the pages
+        if (mNextPage == INVALID_PAGE) return;
 
         // On certain pages, we allow single tap to mark items as selected so that they can be
         // dropped onto the mini workspaces
@@ -368,9 +369,10 @@
 
     @Override
     public boolean onLongClick(View v) {
-        if (!v.isInTouchMode()) {
-            return false;
-        }
+        // Return early if this is not initiated from a touch
+        if (!v.isInTouchMode()) return false;
+        // Return early if we are still animating the pages
+        if (mNextPage == INVALID_PAGE) return false;
 
         // End the current choice mode before we start dragging anything
         if (isChoiceMode(CHOICE_MODE_SINGLE)) {
@@ -604,17 +606,9 @@
             layout.setPadding(mPageLayoutPaddingLeft, mPageLayoutPaddingTop,
                     mPageLayoutPaddingRight, mPageLayoutPaddingBottom);
 
-            // Temporary change to prevent the last page from being too small (and items bleeding
-            // onto it).  We can remove this once we properly fix the fading algorithm
-            if (i < numPages - 1) {
-                addView(layout, new LinearLayout.LayoutParams(
-                        LinearLayout.LayoutParams.WRAP_CONTENT,
-                        LinearLayout.LayoutParams.MATCH_PARENT));
-            } else {
-                addView(layout, new LinearLayout.LayoutParams(
-                        LinearLayout.LayoutParams.MATCH_PARENT,
-                        LinearLayout.LayoutParams.MATCH_PARENT));
-            }
+            addView(layout, new LinearLayout.LayoutParams(
+                    LinearLayout.LayoutParams.WRAP_CONTENT,
+                    LinearLayout.LayoutParams.MATCH_PARENT));
         }
     }
 
@@ -665,17 +659,9 @@
             layout.setPadding(mPageLayoutPaddingLeft, mPageLayoutPaddingTop,
                     mPageLayoutPaddingRight, mPageLayoutPaddingBottom);
 
-            // Temporary change to prevent the last page from being too small (and items bleeding
-            // onto it).  We can remove this once we properly fix the fading algorithm
-            if (i < numPages - 1) {
-                addView(layout, new LinearLayout.LayoutParams(
-                        LinearLayout.LayoutParams.WRAP_CONTENT,
-                        LinearLayout.LayoutParams.MATCH_PARENT));
-            } else {
-                addView(layout, new LinearLayout.LayoutParams(
-                        LinearLayout.LayoutParams.MATCH_PARENT,
-                        LinearLayout.LayoutParams.MATCH_PARENT));
-            }
+            addView(layout, new LinearLayout.LayoutParams(
+                    LinearLayout.LayoutParams.WRAP_CONTENT,
+                    LinearLayout.LayoutParams.MATCH_PARENT));
         }
     }
 
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java
index 109696c..caa1e12 100644
--- a/src/com/android/launcher2/PagedView.java
+++ b/src/com/android/launcher2/PagedView.java
@@ -57,7 +57,7 @@
     // The min drag distance to trigger a page shift (regardless of velocity)
     private static final int MIN_LENGTH_FOR_MOVE = 200;
 
-    private static final int PAGE_SNAP_ANIMATION_DURATION = 1000;
+    private static final int PAGE_SNAP_ANIMATION_DURATION = 750;
     protected static final float NANOTIME_DIV = 1000000000.0f;
 
     // the velocity at which a fling gesture will cause us to snap to the next page
diff --git a/src/com/android/launcher2/PagedViewIcon.java b/src/com/android/launcher2/PagedViewIcon.java
index 50ba8d4..b9b9b37 100644
--- a/src/com/android/launcher2/PagedViewIcon.java
+++ b/src/com/android/launcher2/PagedViewIcon.java
@@ -52,7 +52,7 @@
     private Object mIconCacheKey;
     private PagedViewIconCache mIconCache;
 
-    private int mAlpha;
+    private int mAlpha = -1;
     private int mHolographicAlpha;
 
     private boolean mIsChecked;
@@ -162,9 +162,13 @@
     public void setAlpha(float alpha) {
         final float viewAlpha = sHolographicOutlineHelper.viewAlphaInterpolator(alpha);
         final float holographicAlpha = sHolographicOutlineHelper.highlightAlphaInterpolator(alpha);
-        mAlpha = (int) (viewAlpha * 255);
-        mHolographicAlpha = (int) (holographicAlpha * 255);
-        super.setAlpha(viewAlpha);
+        int newViewAlpha = (int) (viewAlpha * 255);
+        int newHolographicAlpha = (int) (holographicAlpha * 255);
+        if ((mAlpha != newViewAlpha) || (mHolographicAlpha != newHolographicAlpha)) {
+            mAlpha = newViewAlpha;
+            mHolographicAlpha = newHolographicAlpha;
+            super.setAlpha(viewAlpha);
+        }
     }
 
     public void invalidateCheckedImage() {
