diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index c010eed..e55c08d 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -67,7 +67,6 @@
 import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
 import com.android.inputmethod.latin.define.ProductionFlag;
 import com.android.inputmethod.latin.inputlogic.InputLogic;
-import com.android.inputmethod.latin.inputlogic.SpaceState;
 import com.android.inputmethod.latin.personalization.DictionaryDecayBroadcastReciever;
 import com.android.inputmethod.latin.personalization.PersonalizationDictionarySessionRegistrar;
 import com.android.inputmethod.latin.personalization.PersonalizationHelper;
@@ -83,7 +82,6 @@
 import com.android.inputmethod.latin.utils.ImportantNoticeUtils;
 import com.android.inputmethod.latin.utils.IntentUtils;
 import com.android.inputmethod.latin.utils.JniUtils;
-import com.android.inputmethod.latin.utils.LatinImeLoggerUtils;
 import com.android.inputmethod.latin.utils.LeakGuardHandlerWrapper;
 import com.android.inputmethod.latin.utils.SubtypeLocaleUtils;
 import com.android.inputmethod.research.ResearchLogger;
@@ -124,7 +122,8 @@
     private View mKeyPreviewBackingView;
     private SuggestionStripView mSuggestionStripView;
 
-    private CompletionInfo[] mApplicationSpecifiedCompletions;
+    // TODO[IL]: remove this member completely.
+    public CompletionInfo[] mApplicationSpecifiedCompletions;
 
     private RichInputMethodManager mRichImm;
     @UsedForTesting final KeyboardSwitcher mKeyboardSwitcher;
@@ -1307,12 +1306,10 @@
         // Nothing to do so far.
     }
 
-    // TODO[IL]: Move this to InputLogic and make it private
-    @Override
+    // TODO: remove this, read this directly from mInputLogic or something in the tests
+    @UsedForTesting
     public boolean isShowingPunctuationList() {
-        if (mInputLogic.mSuggestedWords == null) return false;
-        return mSettings.getCurrent().mSpacingAndPunctuations.mSuggestPuncList
-                == mInputLogic.mSuggestedWords;
+        return mInputLogic.isShowingPunctuationList(mSettings.getCurrent());
     }
 
     // TODO[IL]: Define a clear interface for this
@@ -1457,94 +1454,14 @@
     // interface
     @Override
     public void pickSuggestionManually(final int index, final SuggestedWordInfo suggestionInfo) {
-        final SuggestedWords suggestedWords = mInputLogic.mSuggestedWords;
-        final String suggestion = suggestionInfo.mWord;
-        // If this is a punctuation picked from the suggestion strip, pass it to onCodeInput
-        if (suggestion.length() == 1 && isShowingPunctuationList()) {
-            // Word separators are suggested before the user inputs something.
-            // So, LatinImeLogger logs "" as a user's input.
-            LatinImeLogger.logOnManualSuggestion("", suggestion, index, suggestedWords);
-            // Rely on onCodeInput to do the complicated swapping/stripping logic consistently.
-            final int primaryCode = suggestion.charAt(0);
-            onCodeInput(primaryCode,
-                    Constants.SUGGESTION_STRIP_COORDINATE, Constants.SUGGESTION_STRIP_COORDINATE);
-            if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
-                ResearchLogger.latinIME_punctuationSuggestion(index, suggestion,
-                        false /* isBatchMode */, suggestedWords.mIsPrediction);
-            }
-            return;
-        }
+        mInputLogic.onPickSuggestionManually(mSettings.getCurrent(), index, suggestionInfo,
+                mHandler, mKeyboardSwitcher);
+    }
 
-        mInputLogic.mConnection.beginBatchEdit();
-        final SettingsValues currentSettings = mSettings.getCurrent();
-        if (SpaceState.PHANTOM == mInputLogic.mSpaceState && suggestion.length() > 0
-                // In the batch input mode, a manually picked suggested word should just replace
-                // the current batch input text and there is no need for a phantom space.
-                && !mInputLogic.mWordComposer.isBatchMode()) {
-            final int firstChar = Character.codePointAt(suggestion, 0);
-            if (!currentSettings.isWordSeparator(firstChar)
-                    || currentSettings.isUsuallyPrecededBySpace(firstChar)) {
-                mInputLogic.promotePhantomSpace(currentSettings);
-            }
-        }
-
-        if (currentSettings.isApplicationSpecifiedCompletionsOn()
-                && mApplicationSpecifiedCompletions != null
-                && index >= 0 && index < mApplicationSpecifiedCompletions.length) {
-            mInputLogic.mSuggestedWords = SuggestedWords.EMPTY;
-            if (mSuggestionStripView != null) {
-                mSuggestionStripView.clear();
-            }
-            mKeyboardSwitcher.updateShiftState();
-            mInputLogic.resetComposingState(true /* alsoResetLastComposedWord */);
-            final CompletionInfo completionInfo = mApplicationSpecifiedCompletions[index];
-            mInputLogic.mConnection.commitCompletion(completionInfo);
-            mInputLogic.mConnection.endBatchEdit();
-            return;
-        }
-
-        // We need to log before we commit, because the word composer will store away the user
-        // typed word.
-        final String replacedWord = mInputLogic.mWordComposer.getTypedWord();
-        LatinImeLogger.logOnManualSuggestion(replacedWord, suggestion, index, suggestedWords);
-        mInputLogic.commitChosenWord(currentSettings, suggestion,
-                LastComposedWord.COMMIT_TYPE_MANUAL_PICK, LastComposedWord.NOT_A_SEPARATOR);
-        if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
-            ResearchLogger.latinIME_pickSuggestionManually(replacedWord, index, suggestion,
-                    mInputLogic.mWordComposer.isBatchMode(), suggestionInfo.mScore,
-                    suggestionInfo.mKind, suggestionInfo.mSourceDict.mDictType);
-        }
-        mInputLogic.mConnection.endBatchEdit();
-        // Don't allow cancellation of manual pick
-        mInputLogic.mLastComposedWord.deactivate();
-        // Space state must be updated before calling updateShiftState
-        mInputLogic.mSpaceState = SpaceState.PHANTOM;
-        mKeyboardSwitcher.updateShiftState();
-
-        // We should show the "Touch again to save" hint if the user pressed the first entry
-        // AND it's in none of our current dictionaries (main, user or otherwise).
-        // Please note that if mSuggest is null, it means that everything is off: suggestion
-        // and correction, so we shouldn't try to show the hint
-        final Suggest suggest = mInputLogic.mSuggest;
-        final boolean showingAddToDictionaryHint =
-                (SuggestedWordInfo.KIND_TYPED == suggestionInfo.mKind
-                        || SuggestedWordInfo.KIND_OOV_CORRECTION == suggestionInfo.mKind)
-                        && suggest != null
-                        // If the suggestion is not in the dictionary, the hint should be shown.
-                        && !suggest.mDictionaryFacilitator.isValidWord(suggestion,
-                                true /* ignoreCase */);
-
-        if (currentSettings.mIsInternal) {
-            LatinImeLoggerUtils.onSeparator((char)Constants.CODE_SPACE,
-                    Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE);
-        }
-        if (showingAddToDictionaryHint
-                && suggest.mDictionaryFacilitator.isUserDictionaryEnabled()) {
-            mSuggestionStripView.showAddToDictionaryHint(suggestion);
-        } else {
-            // If we're not showing the "Touch again to save", then update the suggestion strip.
-            mHandler.postUpdateSuggestionStrip();
-        }
+    @Override
+    public void showAddToDictionaryHint(final String word) {
+        if (null == mSuggestionStripView) return;
+        mSuggestionStripView.showAddToDictionaryHint(word);
     }
 
     // TODO[IL]: Define a clean interface for this
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
index cb68e6b..edca998 100644
--- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
@@ -23,6 +23,7 @@
 import android.util.Log;
 import android.view.KeyCharacterMap;
 import android.view.KeyEvent;
+import android.view.inputmethod.CompletionInfo;
 import android.view.inputmethod.CorrectionInfo;
 import android.view.inputmethod.EditorInfo;
 
@@ -183,6 +184,108 @@
     }
 
     /**
+     * A suggestion was picked from the suggestion strip.
+     * @param settingsValues the current values of the settings.
+     * @param index the index of the suggestion.
+     * @param suggestionInfo the suggestion info.
+     */
+    // Called from {@link SuggestionStripView} through the {@link SuggestionStripView#Listener}
+    // interface
+    public void onPickSuggestionManually(final SettingsValues settingsValues,
+            final int index, final SuggestedWordInfo suggestionInfo,
+            // TODO: remove these two arguments
+            final LatinIME.UIHandler handler, final KeyboardSwitcher keyboardSwitcher) {
+        final SuggestedWords suggestedWords = mSuggestedWords;
+        final String suggestion = suggestionInfo.mWord;
+        // If this is a punctuation picked from the suggestion strip, pass it to onCodeInput
+        if (suggestion.length() == 1 && isShowingPunctuationList(settingsValues)) {
+            // Word separators are suggested before the user inputs something.
+            // So, LatinImeLogger logs "" as a user's input.
+            LatinImeLogger.logOnManualSuggestion("", suggestion, index, suggestedWords);
+            // Rely on onCodeInput to do the complicated swapping/stripping logic consistently.
+            final int primaryCode = suggestion.charAt(0);
+            onCodeInput(primaryCode,
+                    Constants.SUGGESTION_STRIP_COORDINATE, Constants.SUGGESTION_STRIP_COORDINATE,
+                    settingsValues, handler, keyboardSwitcher);
+            if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
+                ResearchLogger.latinIME_punctuationSuggestion(index, suggestion,
+                        false /* isBatchMode */, suggestedWords.mIsPrediction);
+            }
+            return;
+        }
+
+        mConnection.beginBatchEdit();
+        if (SpaceState.PHANTOM == mSpaceState && suggestion.length() > 0
+                // In the batch input mode, a manually picked suggested word should just replace
+                // the current batch input text and there is no need for a phantom space.
+                && !mWordComposer.isBatchMode()) {
+            final int firstChar = Character.codePointAt(suggestion, 0);
+            if (!settingsValues.isWordSeparator(firstChar)
+                    || settingsValues.isUsuallyPrecededBySpace(firstChar)) {
+                promotePhantomSpace(settingsValues);
+            }
+        }
+
+        // TODO: stop relying on mApplicationSpecifiedCompletions. The SuggestionInfo object
+        // should contain a reference to the CompletionInfo instead.
+        if (settingsValues.isApplicationSpecifiedCompletionsOn()
+                && mLatinIME.mApplicationSpecifiedCompletions != null
+                && index >= 0 && index < mLatinIME.mApplicationSpecifiedCompletions.length) {
+            mSuggestedWords = SuggestedWords.EMPTY;
+            mSuggestionStripViewAccessor.setNeutralSuggestionStrip();
+            keyboardSwitcher.updateShiftState();
+            resetComposingState(true /* alsoResetLastComposedWord */);
+            final CompletionInfo completionInfo = mLatinIME.mApplicationSpecifiedCompletions[index];
+            mConnection.commitCompletion(completionInfo);
+            mConnection.endBatchEdit();
+            return;
+        }
+
+        // We need to log before we commit, because the word composer will store away the user
+        // typed word.
+        final String replacedWord = mWordComposer.getTypedWord();
+        LatinImeLogger.logOnManualSuggestion(replacedWord, suggestion, index, suggestedWords);
+        commitChosenWord(settingsValues, suggestion,
+                LastComposedWord.COMMIT_TYPE_MANUAL_PICK, LastComposedWord.NOT_A_SEPARATOR);
+        if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
+            ResearchLogger.latinIME_pickSuggestionManually(replacedWord, index, suggestion,
+                    mWordComposer.isBatchMode(), suggestionInfo.mScore,
+                    suggestionInfo.mKind, suggestionInfo.mSourceDict.mDictType);
+        }
+        mConnection.endBatchEdit();
+        // Don't allow cancellation of manual pick
+        mLastComposedWord.deactivate();
+        // Space state must be updated before calling updateShiftState
+        mSpaceState = SpaceState.PHANTOM;
+        keyboardSwitcher.updateShiftState();
+
+        // We should show the "Touch again to save" hint if the user pressed the first entry
+        // AND it's in none of our current dictionaries (main, user or otherwise).
+        // Please note that if mSuggest is null, it means that everything is off: suggestion
+        // and correction, so we shouldn't try to show the hint
+        final Suggest suggest = mSuggest;
+        final boolean showingAddToDictionaryHint =
+                (SuggestedWordInfo.KIND_TYPED == suggestionInfo.mKind
+                        || SuggestedWordInfo.KIND_OOV_CORRECTION == suggestionInfo.mKind)
+                        && suggest != null
+                        // If the suggestion is not in the dictionary, the hint should be shown.
+                        && !suggest.mDictionaryFacilitator.isValidWord(suggestion,
+                                true /* ignoreCase */);
+
+        if (settingsValues.mIsInternal) {
+            LatinImeLoggerUtils.onSeparator((char)Constants.CODE_SPACE,
+                    Constants.NOT_A_COORDINATE, Constants.NOT_A_COORDINATE);
+        }
+        if (showingAddToDictionaryHint
+                && suggest.mDictionaryFacilitator.isUserDictionaryEnabled()) {
+            mSuggestionStripViewAccessor.showAddToDictionaryHint(suggestion);
+        } else {
+            // If we're not showing the "Touch again to save", then update the suggestion strip.
+            handler.postUpdateSuggestionStrip();
+        }
+    }
+
+    /**
      * Consider an update to the cursor position. Evaluate whether this update has happened as
      * part of normal typing or whether it was an explicit cursor move by the user. In any case,
      * do the necessary adjustments.
@@ -718,7 +821,7 @@
                 if (maybeDoubleSpacePeriod(settingsValues, handler)) {
                     keyboardSwitcher.updateShiftState();
                     mSpaceState = SpaceState.DOUBLE;
-                } else if (!mSuggestionStripViewAccessor.isShowingPunctuationList()) {
+                } else if (!isShowingPunctuationList(settingsValues)) {
                     mSpaceState = SpaceState.WEAK;
                 }
             }
@@ -1330,6 +1433,15 @@
     }
 
     /**
+     * Find out if the punctuation list is shown in the suggestion strip.
+     * @return whether the current suggestions are the punctuation list.
+     */
+    // TODO: make this private. It's used through LatinIME for tests.
+    public boolean isShowingPunctuationList(final SettingsValues settingsValues) {
+        return settingsValues.mSpacingAndPunctuations.mSuggestPuncList == mSuggestedWords;
+    }
+
+    /**
      * Factor in auto-caps and manual caps and compute the current caps mode.
      * @param settingsValues the current settings values.
      * @param keyboardShiftMode the current shift mode of the keyboard. See
diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripViewAccessor.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripViewAccessor.java
index 91bf73d..60f1c7a 100644
--- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripViewAccessor.java
+++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripViewAccessor.java
@@ -23,9 +23,9 @@
  */
 public interface SuggestionStripViewAccessor {
     public boolean hasSuggestionStripView();
+    public void showAddToDictionaryHint(final String word);
     public boolean isShowingAddToDictionaryHint();
     public void dismissAddToDictionaryHint();
-    public boolean isShowingPunctuationList();
     public void setNeutralSuggestionStrip();
     public void showSuggestionStrip(final SuggestedWords suggestedWords);
 }
