diff --git a/native/jni/src/correction.cpp b/native/jni/src/correction.cpp
index e55da0113dc92f47ab88b170b1be06be07b6ad94..7513b307dd74871c906dea8988d554a1b46423f8 100644
--- a/native/jni/src/correction.cpp
+++ b/native/jni/src/correction.cpp
@@ -230,7 +230,7 @@ int Correction::goDownTree(
 }
 
 // TODO: remove
-int Correction::getInputIndex() {
+int Correction::getInputIndex() const {
     return mInputIndex;
 }
 
diff --git a/native/jni/src/correction.h b/native/jni/src/correction.h
index 57e7b7189e8ae3fa1d8bba69274b038b5fc16b57..9899f6e6649ca68a2f21ff714fa0ca5951d7a3d6 100644
--- a/native/jni/src/correction.h
+++ b/native/jni/src/correction.h
@@ -38,63 +38,8 @@ class Correction {
         NOT_ON_TERMINAL
     } CorrectionType;
 
-    /////////////////////////
-    // static inline utils //
-    /////////////////////////
-
-    static const int TWO_31ST_DIV_255 = S_INT_MAX / 255;
-    static inline int capped255MultForFullMatchAccentsOrCapitalizationDifference(const int num) {
-        return (num < TWO_31ST_DIV_255 ? 255 * num : S_INT_MAX);
-    }
-
-    static const int TWO_31ST_DIV_2 = S_INT_MAX / 2;
-    inline static void multiplyIntCapped(const int multiplier, int *base) {
-        const int temp = *base;
-        if (temp != S_INT_MAX) {
-            // Branch if multiplier == 2 for the optimization
-            if (multiplier < 0) {
-                if (DEBUG_DICT) {
-                    assert(false);
-                }
-                AKLOGI("--- Invalid multiplier: %d", multiplier);
-            } else if (multiplier == 0) {
-                *base = 0;
-            } else if (multiplier == 2) {
-                *base = TWO_31ST_DIV_2 >= temp ? temp << 1 : S_INT_MAX;
-            } else {
-                // TODO: This overflow check gives a wrong answer when, for example,
-                //       temp = 2^16 + 1 and multiplier = 2^17 + 1.
-                //       Fix this behavior.
-                const int tempRetval = temp * multiplier;
-                *base = tempRetval >= temp ? tempRetval : S_INT_MAX;
-            }
-        }
-    }
-
-    inline static int powerIntCapped(const int base, const int n) {
-        if (n <= 0) return 1;
-        if (base == 2) {
-            return n < 31 ? 1 << n : S_INT_MAX;
-        } else {
-            int ret = base;
-            for (int i = 1; i < n; ++i) multiplyIntCapped(base, &ret);
-            return ret;
-        }
-    }
-
-    inline static void multiplyRate(const int rate, int *freq) {
-        if (*freq != S_INT_MAX) {
-            if (*freq > 1000000) {
-                *freq /= 100;
-                multiplyIntCapped(rate, freq);
-            } else {
-                multiplyIntCapped(rate, freq);
-                *freq /= 100;
-            }
-        }
-    }
-
     Correction() {};
+    virtual ~Correction();
     void resetCorrection();
     void initCorrection(
             const ProximityInfo *pi, const int inputLength, const int maxWordLength);
@@ -108,27 +53,7 @@ class Correction {
     bool sameAsTyped();
     bool initProcessState(const int index);
 
-    int getInputIndex();
-
-    virtual ~Correction();
-    int getSpaceProximityPos() const {
-        return mSpaceProximityPos;
-    }
-    int getMissingSpacePos() const {
-        return mMissingSpacePos;
-    }
-
-    int getSkipPos() const {
-        return mSkipPos;
-    }
-
-    int getExcessivePos() const {
-        return mExcessivePos;
-    }
-
-    int getTransposedPos() const {
-        return mTransposedPos;
-    }
+    int getInputIndex() const;
 
     bool needsToPrune() const;
 
@@ -195,6 +120,81 @@ class Correction {
 
  private:
     DISALLOW_COPY_AND_ASSIGN(Correction);
+
+    /////////////////////////
+    // static inline utils //
+    /////////////////////////
+    static const int TWO_31ST_DIV_255 = S_INT_MAX / 255;
+    static inline int capped255MultForFullMatchAccentsOrCapitalizationDifference(const int num) {
+        return (num < TWO_31ST_DIV_255 ? 255 * num : S_INT_MAX);
+    }
+
+    static const int TWO_31ST_DIV_2 = S_INT_MAX / 2;
+    inline static void multiplyIntCapped(const int multiplier, int *base) {
+        const int temp = *base;
+        if (temp != S_INT_MAX) {
+            // Branch if multiplier == 2 for the optimization
+            if (multiplier < 0) {
+                if (DEBUG_DICT) {
+                    assert(false);
+                }
+                AKLOGI("--- Invalid multiplier: %d", multiplier);
+            } else if (multiplier == 0) {
+                *base = 0;
+            } else if (multiplier == 2) {
+                *base = TWO_31ST_DIV_2 >= temp ? temp << 1 : S_INT_MAX;
+            } else {
+                // TODO: This overflow check gives a wrong answer when, for example,
+                //       temp = 2^16 + 1 and multiplier = 2^17 + 1.
+                //       Fix this behavior.
+                const int tempRetval = temp * multiplier;
+                *base = tempRetval >= temp ? tempRetval : S_INT_MAX;
+            }
+        }
+    }
+
+    inline static int powerIntCapped(const int base, const int n) {
+        if (n <= 0) return 1;
+        if (base == 2) {
+            return n < 31 ? 1 << n : S_INT_MAX;
+        } else {
+            int ret = base;
+            for (int i = 1; i < n; ++i) multiplyIntCapped(base, &ret);
+            return ret;
+        }
+    }
+
+    inline static void multiplyRate(const int rate, int *freq) {
+        if (*freq != S_INT_MAX) {
+            if (*freq > 1000000) {
+                *freq /= 100;
+                multiplyIntCapped(rate, freq);
+            } else {
+                multiplyIntCapped(rate, freq);
+                *freq /= 100;
+            }
+        }
+    }
+
+    inline int getSpaceProximityPos() const {
+        return mSpaceProximityPos;
+    }
+    inline int getMissingSpacePos() const {
+        return mMissingSpacePos;
+    }
+
+    inline int getSkipPos() const {
+        return mSkipPos;
+    }
+
+    inline int getExcessivePos() const {
+        return mExcessivePos;
+    }
+
+    inline int getTransposedPos() const {
+        return mTransposedPos;
+    }
+
     inline void incrementInputIndex();
     inline void incrementOutputIndex();
     inline void startToTraverseAllNodes();
diff --git a/native/jni/src/proximity_info.h b/native/jni/src/proximity_info.h
index 8a407e71ad894821f6c9e1014bca44c063c8b284..7ee633ba83b6c6d34cc69245b353452930d4d91f 100644
--- a/native/jni/src/proximity_info.h
+++ b/native/jni/src/proximity_info.h
@@ -41,21 +41,12 @@ class ProximityInfo {
     float getNormalizedSquaredDistanceFromCenterFloat(
             const int keyId, const int x, const int y) const;
     bool sameAsTyped(const unsigned short *word, int length) const;
-    int squaredDistanceToEdge(const int keyId, const int x, const int y) const;
-    bool isOnKey(const int keyId, const int x, const int y) const {
-        if (keyId < 0) return true; // NOT_A_ID is -1, but return whenever < 0 just in case
-        const int left = mKeyXCoordinates[keyId];
-        const int top = mKeyYCoordinates[keyId];
-        const int right = left + mKeyWidths[keyId] + 1;
-        const int bottom = top + mKeyHeights[keyId];
-        return left < right && top < bottom && x >= left && x < right && y >= top && y < bottom;
-    }
     int getKeyIndex(const int c) const;
     int getKeyCode(const int keyIndex) const;
     bool hasSweetSpotData(const int keyIndex) const {
         // When there are no calibration data for a key,
         // the radius of the key is assigned to zero.
-        return mSweetSpotRadii[keyIndex] > 0.0;
+        return mSweetSpotRadii[keyIndex] > 0.0f;
     }
     float getSweetSpotRadiiAt(int keyIndex) const {
         return mSweetSpotRadii[keyIndex];
@@ -111,10 +102,6 @@ class ProximityInfo {
     float getKeyCenterYOfIdG(int keyId) const;
     int getKeyKeyDistanceG(int key0, int key1) const;
 
-    // Returns the keyboard key-center information.
-    void getCenters(int *centersX, int *centersY, int *codeToKeyIndex, int *keyToCodeIndex,
-            int *keyCount, int *keyWidth) const;
-
  private:
     DISALLOW_IMPLICIT_CONSTRUCTORS(ProximityInfo);
     // The max number of the keys in one keyboard layout
@@ -131,6 +118,15 @@ class ProximityInfo {
     float calculateSquaredDistanceFromSweetSpotCenter(
             const int keyIndex, const int inputIndex) const;
     bool hasInputCoordinates() const;
+    int squaredDistanceToEdge(const int keyId, const int x, const int y) const;
+    bool isOnKey(const int keyId, const int x, const int y) const {
+        if (keyId < 0) return true; // NOT_A_ID is -1, but return whenever < 0 just in case
+        const int left = mKeyXCoordinates[keyId];
+        const int top = mKeyYCoordinates[keyId];
+        const int right = left + mKeyWidths[keyId] + 1;
+        const int bottom = top + mKeyHeights[keyId];
+        return left < right && top < bottom && x >= left && x < right && y >= top && y < bottom;
+    }
 
     const int MAX_PROXIMITY_CHARS_SIZE;
     const int KEYBOARD_WIDTH;
diff --git a/native/jni/src/proximity_info_state.h b/native/jni/src/proximity_info_state.h
index 474c4075766ea83cfa85bacdba5d710284d84468..2fb0ae044bee4e86bec18e3a994959e58ffa7c57 100644
--- a/native/jni/src/proximity_info_state.h
+++ b/native/jni/src/proximity_info_state.h
@@ -48,9 +48,6 @@ class ProximityInfoState {
     // Defined here                        //
     /////////////////////////////////////////
     ProximityInfoState() {};
-    inline const int *getProximityCharsAt(const int index) const {
-        return mInputCodes + (index * MAX_PROXIMITY_CHARS_SIZE_INTERNAL);
-    }
 
     inline unsigned short getPrimaryCharAt(const int index) const {
         return getProximityCharsAt(index)[0];
@@ -194,6 +191,10 @@ class ProximityInfoState {
         return mInputXCoordinates && mInputYCoordinates;
     }
 
+    inline const int *getProximityCharsAt(const int index) const {
+        return mInputCodes + (index * MAX_PROXIMITY_CHARS_SIZE_INTERNAL);
+    }
+
     // const
     const ProximityInfo *mProximityInfo;
     bool mHasTouchPositionCorrectionData;