diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSet.java b/java/src/com/android/inputmethod/keyboard/KeyboardSet.java
index 680ff0d..52096c8 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardSet.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardSet.java
@@ -42,7 +42,6 @@
 import java.lang.ref.SoftReference;
 import java.util.HashMap;
 import java.util.Locale;
-import java.util.Map;
 
 /**
  * This class represents a set of keyboards. Each of them represents a different keyboard
@@ -75,7 +74,7 @@
     }
 
     public static class KeysCache {
-        private final Map<Key, Key> mMap;
+        private final HashMap<Key, Key> mMap;
 
         public KeysCache() {
             mMap = new HashMap<Key, Key>();
@@ -108,7 +107,7 @@
         int mOrientation;
         int mWidth;
         // KeyboardSet element id to keyboard layout XML id map.
-        final Map<Integer, Integer> mKeyboardSetElementIdToXmlIdMap =
+        final HashMap<Integer, Integer> mKeyboardSetElementIdToXmlIdMap =
                 new HashMap<Integer, Integer>();
         Params() {}
     }
diff --git a/java/src/com/android/inputmethod/latin/AutoCorrection.java b/java/src/com/android/inputmethod/latin/AutoCorrection.java
index 9c35f8f..ef88f99 100644
--- a/java/src/com/android/inputmethod/latin/AutoCorrection.java
+++ b/java/src/com/android/inputmethod/latin/AutoCorrection.java
@@ -20,7 +20,7 @@
 import android.util.Log;
 
 import java.util.ArrayList;
-import java.util.Map;
+import java.util.HashMap;
 
 public class AutoCorrection {
     private static final boolean DBG = LatinImeLogger.sDBG;
@@ -30,7 +30,7 @@
         // Purely static class: can't instantiate.
     }
 
-    public static CharSequence computeAutoCorrectionWord(Map<String, Dictionary> dictionaries,
+    public static CharSequence computeAutoCorrectionWord(HashMap<String, Dictionary> dictionaries,
             WordComposer wordComposer, ArrayList<CharSequence> suggestions, int[] sortedScores,
             CharSequence consideredWord, double autoCorrectionThreshold,
             CharSequence whitelistedWord) {
@@ -47,7 +47,7 @@
     }
 
     public static boolean isValidWord(
-            Map<String, Dictionary> dictionaries, CharSequence word, boolean ignoreCase) {
+            HashMap<String, Dictionary> dictionaries, CharSequence word, boolean ignoreCase) {
         if (TextUtils.isEmpty(word)) {
             return false;
         }
@@ -72,7 +72,7 @@
     }
 
     public static boolean allowsToBeAutoCorrected(
-            Map<String, Dictionary> dictionaries, CharSequence word, boolean ignoreCase) {
+            HashMap<String, Dictionary> dictionaries, CharSequence word, boolean ignoreCase) {
         final WhitelistDictionary whitelistDictionary =
                 (WhitelistDictionary)dictionaries.get(Suggest.DICT_KEY_WHITELIST);
         // If "word" is in the whitelist dictionary, it should not be auto corrected.
@@ -87,9 +87,9 @@
         return whiteListedWord != null;
     }
 
-    private static boolean hasAutoCorrectionForConsideredWord(Map<String, Dictionary> dictionaries,
-            WordComposer wordComposer, ArrayList<CharSequence> suggestions,
-            CharSequence consideredWord) {
+    private static boolean hasAutoCorrectionForConsideredWord(
+            HashMap<String, Dictionary> dictionaries, WordComposer wordComposer,
+            ArrayList<CharSequence> suggestions, CharSequence consideredWord) {
         if (TextUtils.isEmpty(consideredWord)) return false;
         return wordComposer.size() > 1 && suggestions.size() > 0
                 && !allowsToBeAutoCorrected(dictionaries, consideredWord, false);
diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionaryGetter.java b/java/src/com/android/inputmethod/latin/BinaryDictionaryGetter.java
index 79441c5..1c24cd1 100644
--- a/java/src/com/android/inputmethod/latin/BinaryDictionaryGetter.java
+++ b/java/src/com/android/inputmethod/latin/BinaryDictionaryGetter.java
@@ -25,7 +25,6 @@
 
 import java.io.File;
 import java.util.ArrayList;
-import java.util.List;
 import java.util.Locale;
 
 /**
@@ -264,9 +263,9 @@
      * - Gets a file name from the fallback resource passed as an argument.
      * If that fails:
      * - Returns null.
-     * @return The address of a valid file, or null.
+     * @return The list of addresses of valid dictionary files, or null.
      */
-    public static List<AssetFileAddress> getDictionaryFiles(final Locale locale,
+    public static ArrayList<AssetFileAddress> getDictionaryFiles(final Locale locale,
             final Context context, final int fallbackResId) {
 
         // cacheWordListsFromContentProvider returns the list of files it copied to local
diff --git a/java/src/com/android/inputmethod/latin/DictionaryCollection.java b/java/src/com/android/inputmethod/latin/DictionaryCollection.java
index c19a5a7..5de770a 100644
--- a/java/src/com/android/inputmethod/latin/DictionaryCollection.java
+++ b/java/src/com/android/inputmethod/latin/DictionaryCollection.java
@@ -22,7 +22,6 @@
 
 import java.util.Collection;
 import java.util.Collections;
-import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
 
 /**
@@ -30,7 +29,7 @@
  */
 public class DictionaryCollection extends Dictionary {
     private final String TAG = DictionaryCollection.class.getSimpleName();
-    protected final List<Dictionary> mDictionaries;
+    protected final CopyOnWriteArrayList<Dictionary> mDictionaries;
 
     public DictionaryCollection() {
         mDictionaries = new CopyOnWriteArrayList<Dictionary>();
diff --git a/java/src/com/android/inputmethod/latin/DictionaryFactory.java b/java/src/com/android/inputmethod/latin/DictionaryFactory.java
index 7a81f7b..77c685c 100644
--- a/java/src/com/android/inputmethod/latin/DictionaryFactory.java
+++ b/java/src/com/android/inputmethod/latin/DictionaryFactory.java
@@ -22,8 +22,8 @@
 import android.util.Log;
 
 import java.io.File;
+import java.util.ArrayList;
 import java.util.LinkedList;
-import java.util.List;
 import java.util.Locale;
 
 /**
@@ -52,8 +52,8 @@
             return new DictionaryCollection(createBinaryDictionary(context, fallbackResId, locale));
         }
 
-        final List<Dictionary> dictList = new LinkedList<Dictionary>();
-        final List<AssetFileAddress> assetFileList =
+        final LinkedList<Dictionary> dictList = new LinkedList<Dictionary>();
+        final ArrayList<AssetFileAddress> assetFileList =
                 BinaryDictionaryGetter.getDictionaryFiles(locale, context, fallbackResId);
         if (null != assetFileList) {
             for (final AssetFileAddress f : assetFileList) {
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 234a501..d5cd35d 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -73,7 +73,6 @@
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
 import java.util.ArrayList;
-import java.util.List;
 import java.util.Locale;
 
 /**
@@ -919,7 +918,7 @@
                 return;
             }
 
-            final List<SuggestedWords.SuggestedWordInfo> applicationSuggestedWords =
+            final ArrayList<SuggestedWords.SuggestedWordInfo> applicationSuggestedWords =
                     SuggestedWords.getFromApplicationSpecifiedCompletions(
                             applicationSpecifiedCompletions);
             final SuggestedWords suggestedWords = new SuggestedWords(
diff --git a/java/src/com/android/inputmethod/latin/LatinImeLogger.java b/java/src/com/android/inputmethod/latin/LatinImeLogger.java
index 5390ee3..683dafa 100644
--- a/java/src/com/android/inputmethod/latin/LatinImeLogger.java
+++ b/java/src/com/android/inputmethod/latin/LatinImeLogger.java
@@ -22,8 +22,6 @@
 
 import com.android.inputmethod.keyboard.Keyboard;
 
-import java.util.List;
-
 public class LatinImeLogger implements SharedPreferences.OnSharedPreferenceChangeListener {
 
     public static boolean sDBG = false;
diff --git a/java/src/com/android/inputmethod/latin/SettingsValues.java b/java/src/com/android/inputmethod/latin/SettingsValues.java
index 4346a36..020b57c 100644
--- a/java/src/com/android/inputmethod/latin/SettingsValues.java
+++ b/java/src/com/android/inputmethod/latin/SettingsValues.java
@@ -30,8 +30,6 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
 import java.util.Locale;
 
 public class SettingsValues {
diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java
index 69754d7..08f0e42 100644
--- a/java/src/com/android/inputmethod/latin/Suggest.java
+++ b/java/src/com/android/inputmethod/latin/Suggest.java
@@ -30,15 +30,12 @@
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
 
 /**
  * This class loads a dictionary and provides a list of suggestions for a given sequence of
  * characters. This includes corrections and completions.
  */
 public class Suggest implements Dictionary.WordCallback {
-
     public static final String TAG = Suggest.class.getSimpleName();
 
     public static final int APPROX_MAX_WORD_LENGTH = 32;
@@ -87,8 +84,10 @@
     private Dictionary mMainDict;
     private ContactsDictionary mContactsDict;
     private WhitelistDictionary mWhiteListDictionary;
-    private final Map<String, Dictionary> mUnigramDictionaries = new HashMap<String, Dictionary>();
-    private final Map<String, Dictionary> mBigramDictionaries = new HashMap<String, Dictionary>();
+    private final HashMap<String, Dictionary> mUnigramDictionaries =
+            new HashMap<String, Dictionary>();
+    private final HashMap<String, Dictionary> mBigramDictionaries =
+            new HashMap<String, Dictionary>();
 
     private int mPrefMaxSuggestions = 18;
 
@@ -142,7 +141,7 @@
         initWhitelistAndAutocorrectAndPool(context, locale);
     }
 
-    private static void addOrReplaceDictionary(Map<String, Dictionary> dictionaries, String key,
+    private static void addOrReplaceDictionary(HashMap<String, Dictionary> dictionaries, String key,
             Dictionary dict) {
         final Dictionary oldDict = (dict == null)
                 ? dictionaries.remove(key)
@@ -177,7 +176,7 @@
         return mContactsDict;
     }
 
-    public Map<String, Dictionary> getUnigramDictionaries() {
+    public HashMap<String, Dictionary> getUnigramDictionaries() {
         return mUnigramDictionaries;
     }
 
@@ -563,7 +562,7 @@
     }
 
     public void close() {
-        final Set<Dictionary> dictionaries = new HashSet<Dictionary>();
+        final HashSet<Dictionary> dictionaries = new HashSet<Dictionary>();
         dictionaries.addAll(mUnigramDictionaries.values());
         dictionaries.addAll(mBigramDictionaries.values());
         for (final Dictionary dictionary : dictionaries) {
diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java
index b63bc6c..ef8e58e 100644
--- a/java/src/com/android/inputmethod/latin/SuggestedWords.java
+++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java
@@ -21,22 +21,20 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collections;
 import java.util.HashSet;
-import java.util.List;
 
 public class SuggestedWords {
     public static final SuggestedWords EMPTY = new SuggestedWords(
-            Collections.<SuggestedWordInfo>emptyList(), false, false, false, false, false);
+            new ArrayList<SuggestedWordInfo>(0), false, false, false, false, false);
 
     public final boolean mTypedWordValid;
     public final boolean mHasAutoCorrectionCandidate;
     public final boolean mIsPunctuationSuggestions;
     public final boolean mAllowsToBeAutoCorrected;
     public final boolean mIsObsoleteSuggestions;
-    private final List<SuggestedWordInfo> mSuggestedWordInfoList;
+    private final ArrayList<SuggestedWordInfo> mSuggestedWordInfoList;
 
-    public SuggestedWords(final List<SuggestedWordInfo> suggestedWordInfoList,
+    public SuggestedWords(final ArrayList<SuggestedWordInfo> suggestedWordInfoList,
             final boolean typedWordValid,
             final boolean hasAutoCorrectionCandidate,
             final boolean allowsToBeAutoCorrected,
@@ -82,7 +80,7 @@
     }
 
     public static ArrayList<SuggestedWordInfo> getFromCharSequenceList(
-            final List<CharSequence> wordList) {
+            final ArrayList<CharSequence> wordList) {
         final ArrayList<SuggestedWordInfo> result = new ArrayList<SuggestedWordInfo>();
         for (CharSequence word : wordList) {
             if (null != word) result.add(new SuggestedWordInfo(word));
@@ -90,7 +88,7 @@
         return result;
     }
 
-    public static List<SuggestedWordInfo> getFromApplicationSpecifiedCompletions(
+    public static ArrayList<SuggestedWordInfo> getFromApplicationSpecifiedCompletions(
             final CompletionInfo[] infos) {
         final ArrayList<SuggestedWordInfo> result = new ArrayList<SuggestedWordInfo>();
         for (CompletionInfo info : infos) {
diff --git a/java/src/com/android/inputmethod/latin/XmlParseUtils.java b/java/src/com/android/inputmethod/latin/XmlParseUtils.java
index e14c71c..481cdfa 100644
--- a/java/src/com/android/inputmethod/latin/XmlParseUtils.java
+++ b/java/src/com/android/inputmethod/latin/XmlParseUtils.java
@@ -24,6 +24,10 @@
 import java.io.IOException;
 
 public class XmlParseUtils {
+    private XmlParseUtils() {
+        // This utility class is not publicly instantiable.
+    }
+
     @SuppressWarnings("serial")
     public static class ParseException extends XmlPullParserException {
         public ParseException(String msg, XmlPullParser parser) {
diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java
index d3c3afb..286bf0a 100644
--- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java
+++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java
@@ -66,7 +66,6 @@
 import com.android.inputmethod.latin.Utils;
 
 import java.util.ArrayList;
-import java.util.List;
 
 public class SuggestionsView extends RelativeLayout implements OnClickListener,
         OnLongClickListener {
@@ -144,9 +143,9 @@
         public final float mMinMoreSuggestionsWidth;
         public final int mMoreSuggestionsBottomGap;
 
-        private final List<TextView> mWords;
-        private final List<View> mDividers;
-        private final List<TextView> mInfos;
+        private final ArrayList<TextView> mWords;
+        private final ArrayList<View> mDividers;
+        private final ArrayList<TextView> mInfos;
 
         private final int mColorValidTypedWord;
         private final int mColorTypedWord;
@@ -174,7 +173,7 @@
         private final TextView mHintToSaveView;
 
         public SuggestionsViewParams(Context context, AttributeSet attrs, int defStyle,
-                List<TextView> words, List<View> dividers, List<TextView> infos) {
+                ArrayList<TextView> words, ArrayList<View> dividers, ArrayList<TextView> infos) {
             mWords = words;
             mDividers = dividers;
             mInfos = infos;
