diff --git a/java/src/com/android/inputmethod/latin/RichInputConnection.java b/java/src/com/android/inputmethod/latin/RichInputConnection.java
index 79d6674..a5b147a 100644
--- a/java/src/com/android/inputmethod/latin/RichInputConnection.java
+++ b/java/src/com/android/inputmethod/latin/RichInputConnection.java
@@ -27,7 +27,6 @@
 import android.view.inputmethod.InputConnection;
 
 import com.android.inputmethod.latin.define.ProductionFlag;
-import com.android.inputmethod.latin.settings.SettingsValues;
 import com.android.inputmethod.latin.settings.SpacingAndPunctuations;
 import com.android.inputmethod.latin.utils.CapsModeUtils;
 import com.android.inputmethod.latin.utils.DebugLogUtils;
@@ -98,7 +97,7 @@
         final ExtractedText et = mIC.getExtractedText(r, 0);
         final CharSequence beforeCursor = getTextBeforeCursor(Constants.EDITOR_CONTENTS_CACHE_SIZE,
                 0);
-        final StringBuilder internal = new StringBuilder().append(mCommittedTextBeforeComposingText)
+        final StringBuilder internal = new StringBuilder(mCommittedTextBeforeComposingText)
                 .append(mComposingText);
         if (null == et || null == beforeCursor) return;
         final int actualLength = Math.min(beforeCursor.length(), internal.length());
@@ -253,8 +252,7 @@
     }
 
     public CharSequence getSelectedText(final int flags) {
-        if (null == mIC) return null;
-        return mIC.getSelectedText(flags);
+        return (null == mIC) ? null : mIC.getSelectedText(flags);
     }
 
     public boolean canDeleteCharacters() {
@@ -272,12 +270,12 @@
      * American English, it's just the most common set of rules for English).
      *
      * @param inputType a mask of the caps modes to test for.
-     * @param settingsValues the values of the settings to use for locale and separators.
+     * @param spacingAndPunctuations the values of the settings to use for locale and separators.
      * @param hasSpaceBefore if we should consider there should be a space after the string.
      * @return the caps modes that should be on as a set of bits
      */
-    public int getCursorCapsMode(final int inputType, final SettingsValues settingsValues,
-            final boolean hasSpaceBefore) {
+    public int getCursorCapsMode(final int inputType,
+            final SpacingAndPunctuations spacingAndPunctuations, final boolean hasSpaceBefore) {
         mIC = mParent.getCurrentInputConnection();
         if (null == mIC) return Constants.TextUtils.CAP_MODE_OFF;
         if (!TextUtils.isEmpty(mComposingText)) {
@@ -304,13 +302,13 @@
         // This never calls InputConnection#getCapsMode - in fact, it's a static method that
         // never blocks or initiates IPC.
         return CapsModeUtils.getCapsMode(mCommittedTextBeforeComposingText, inputType,
-                settingsValues.mSpacingAndPunctuations, hasSpaceBefore);
+                spacingAndPunctuations, hasSpaceBefore);
     }
 
     public int getCodePointBeforeCursor() {
-        if (mCommittedTextBeforeComposingText.length() < 1) return Constants.NOT_A_CODE;
-        return Character.codePointBefore(mCommittedTextBeforeComposingText,
-                mCommittedTextBeforeComposingText.length());
+        final int length = mCommittedTextBeforeComposingText.length();
+        if (length < 1) return Constants.NOT_A_CODE;
+        return Character.codePointBefore(mCommittedTextBeforeComposingText, length);
     }
 
     public CharSequence getTextBeforeCursor(final int n, final int flags) {
@@ -338,16 +336,12 @@
             return s;
         }
         mIC = mParent.getCurrentInputConnection();
-        if (null != mIC) {
-            return mIC.getTextBeforeCursor(n, flags);
-        }
-        return null;
+        return (null == mIC) ? null : mIC.getTextBeforeCursor(n, flags);
     }
 
     public CharSequence getTextAfterCursor(final int n, final int flags) {
         mIC = mParent.getCurrentInputConnection();
-        if (null != mIC) return mIC.getTextAfterCursor(n, flags);
-        return null;
+        return (null == mIC) ? null : mIC.getTextAfterCursor(n, flags);
     }
 
     public void deleteSurroundingText(final int beforeLength, final int afterLength) {
@@ -681,23 +675,28 @@
                         startIndexInBefore, before.length() + endIndexInAfter, before.length());
     }
 
-    public boolean isCursorTouchingWord(final SettingsValues settingsValues) {
+    public boolean isCursorTouchingWord(final SpacingAndPunctuations spacingAndPunctuations) {
         final int codePointBeforeCursor = getCodePointBeforeCursor();
-        if (Constants.NOT_A_CODE != codePointBeforeCursor
-                && !settingsValues.isWordSeparator(codePointBeforeCursor)
-                && !settingsValues.isWordConnector(codePointBeforeCursor)) {
-            return true;
+        if (Constants.NOT_A_CODE == codePointBeforeCursor
+                || spacingAndPunctuations.isWordSeparator(codePointBeforeCursor)
+                || spacingAndPunctuations.isWordConnector(codePointBeforeCursor)) {
+            return isCursorFollowedByWordCharacter(spacingAndPunctuations);
         }
-        return isCursorFollowedByWordCharacter(settingsValues);
+        return true;
     }
 
-    public boolean isCursorFollowedByWordCharacter(final SettingsValues settingsValues) {
+    public boolean isCursorFollowedByWordCharacter(
+            final SpacingAndPunctuations spacingAndPunctuations) {
         final CharSequence after = getTextAfterCursor(1, 0);
-        if (!TextUtils.isEmpty(after) && !settingsValues.isWordSeparator(after.charAt(0))
-                && !settingsValues.isWordConnector(after.charAt(0))) {
-            return true;
+        if (TextUtils.isEmpty(after)) {
+            return false;
         }
-        return false;
+        final int codePointAfterCursor = Character.codePointAt(after, 0);
+        if (spacingAndPunctuations.isWordSeparator(codePointAfterCursor)
+                || spacingAndPunctuations.isWordConnector(codePointAfterCursor)) {
+            return false;
+        }
+        return true;
     }
 
     public void removeTrailingSpace() {
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
index fcad047..3ff2079 100644
--- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
@@ -530,7 +530,7 @@
                 && settingsValues.isSuggestionsRequested() &&
         // In languages with spaces, we only start composing a word when we are not already
         // touching a word. In languages without spaces, the above conditions are sufficient.
-                (!mConnection.isCursorTouchingWord(settingsValues)
+                (!mConnection.isCursorTouchingWord(settingsValues.mSpacingAndPunctuations)
                         || !settingsValues.mSpacingAndPunctuations.mCurrentLanguageHasSpaces)) {
             // Reset entirely the composing state anyway, then start composing a new word unless
             // the character is a single quote or a dash. The idea here is, single quote and dash
@@ -816,7 +816,8 @@
             }
             if (settingsValues.isSuggestionStripVisible()
                     && settingsValues.mSpacingAndPunctuations.mCurrentLanguageHasSpaces
-                    && !mConnection.isCursorFollowedByWordCharacter(settingsValues)) {
+                    && !mConnection.isCursorFollowedByWordCharacter(
+                            settingsValues.mSpacingAndPunctuations)) {
                 restartSuggestionsOnWordTouchedByCursor(settingsValues,
                         true /* includeResumedWordInSuggestions */, keyboardSwitcher);
             }
@@ -1069,7 +1070,7 @@
         // If we don't know the cursor location, return.
         if (mConnection.getExpectedSelectionStart() < 0) return;
         final int expectedCursorPosition = mConnection.getExpectedSelectionStart();
-        if (!mConnection.isCursorTouchingWord(settingsValues)) return;
+        if (!mConnection.isCursorTouchingWord(settingsValues.mSpacingAndPunctuations)) return;
         final TextRange range = mConnection.getWordRangeAtCursor(
                 settingsValues.mSpacingAndPunctuations.mWordSeparators,
                 0 /* additionalPrecedingWordsCount */);
@@ -1290,7 +1291,7 @@
         final int inputType = ei.inputType;
         // Warning: this depends on mSpaceState, which may not be the most current value. If
         // mSpaceState gets updated later, whoever called this may need to be told about it.
-        return mConnection.getCursorCapsMode(inputType, settingsValues,
+        return mConnection.getCursorCapsMode(inputType, settingsValues.mSpacingAndPunctuations,
                 SpaceState.PHANTOM == mSpaceState);
     }
 
