diff --git a/java/src/com/android/inputmethod/latin/AbstractDictionaryWriter.java b/java/src/com/android/inputmethod/latin/AbstractDictionaryWriter.java
index 1aee22b..1c6a14e 100644
--- a/java/src/com/android/inputmethod/latin/AbstractDictionaryWriter.java
+++ b/java/src/com/android/inputmethod/latin/AbstractDictionaryWriter.java
@@ -16,12 +16,12 @@
 
 package com.android.inputmethod.latin;
 
-import android.content.Context;
 import android.util.Log;
 
 import com.android.inputmethod.latin.makedict.DictEncoder;
 import com.android.inputmethod.latin.makedict.UnsupportedFormatException;
-import com.android.inputmethod.latin.makedict.Ver2DictEncoder;
+import com.android.inputmethod.latin.makedict.Ver4DictEncoder;
+import com.android.inputmethod.latin.utils.FileUtils;
 
 import java.io.File;
 import java.io.IOException;
@@ -31,10 +31,7 @@
     /** Used for Log actions from this class */
     private static final String TAG = AbstractDictionaryWriter.class.getSimpleName();
 
-    private final Context mContext;
-
-    public AbstractDictionaryWriter(final Context context) {
-        mContext = context;
+    public AbstractDictionaryWriter() {
     }
 
     abstract public void clear();
@@ -61,12 +58,11 @@
             final Map<String, String> attributeMap) throws IOException, UnsupportedFormatException;
 
     public void write(final File file, final Map<String, String> attributeMap) {
-        final String tempFilePath = file.getAbsolutePath() + ".temp";
-        final File tempFile = new File(tempFilePath);
         try {
-            final DictEncoder dictEncoder = new Ver2DictEncoder(tempFile);
+            FileUtils.deleteRecursively(file);
+            file.mkdir();
+            final DictEncoder dictEncoder = new Ver4DictEncoder(file);
             writeDictionary(dictEncoder, attributeMap);
-            tempFile.renameTo(file);
         } catch (IOException e) {
             Log.e(TAG, "IO exception while writing file", e);
         } catch (UnsupportedFormatException e) {
diff --git a/java/src/com/android/inputmethod/latin/DictionaryWriter.java b/java/src/com/android/inputmethod/latin/DictionaryWriter.java
index 89ef96d..8489868 100644
--- a/java/src/com/android/inputmethod/latin/DictionaryWriter.java
+++ b/java/src/com/android/inputmethod/latin/DictionaryWriter.java
@@ -16,8 +16,6 @@
 
 package com.android.inputmethod.latin;
 
-import android.content.Context;
-
 import com.android.inputmethod.latin.makedict.DictEncoder;
 import com.android.inputmethod.latin.makedict.FormatSpec;
 import com.android.inputmethod.latin.makedict.FusionDictionary;
@@ -35,14 +33,13 @@
  * An in memory dictionary for memorizing entries and writing a binary dictionary.
  */
 public class DictionaryWriter extends AbstractDictionaryWriter {
-    private static final int BINARY_DICT_VERSION = 2;
+    private static final int BINARY_DICT_VERSION = FormatSpec.VERSION4;
     private static final FormatSpec.FormatOptions FORMAT_OPTIONS =
-            new FormatSpec.FormatOptions(BINARY_DICT_VERSION, false /* supportsDynamicUpdate */);
+            new FormatSpec.FormatOptions(BINARY_DICT_VERSION, false /* hasTimestamp */);
 
     private FusionDictionary mFusionDictionary;
 
-    public DictionaryWriter(final Context context) {
-        super(context);
+    public DictionaryWriter() {
         clear();
     }
 
diff --git a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
index ecef20e..8e1675b 100644
--- a/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
+++ b/java/src/com/android/inputmethod/latin/ExpandableBinaryDictionary.java
@@ -136,12 +136,8 @@
      */
     protected abstract boolean hasContentChanged();
 
-    protected boolean matchesExpectedBinaryDictFormatVersionForThisType(final int formatVersion) {
-        // This class is using format 2 because it's used by the User and Contacts dictionary
-        // only, which right now use format 2 (dicts using format 4 use Decaying*, which overrides
-        // this method).
-        // TODO: Migrate these dicts to ver4 format, and remove this function.
-        return formatVersion == FormatSpec.VERSION2;
+    private boolean matchesExpectedBinaryDictFormatVersionForThisType(final int formatVersion) {
+        return formatVersion == FormatSpec.VERSION4;
     }
 
     public boolean isValidDictionary() {
@@ -194,12 +190,12 @@
         }
     }
 
-    private static AbstractDictionaryWriter getDictionaryWriter(final Context context,
+    private static AbstractDictionaryWriter getDictionaryWriter(
             final boolean isDynamicPersonalizationDictionary) {
         if (isDynamicPersonalizationDictionary) {
              return null;
         } else {
-            return new DictionaryWriter(context);
+            return new DictionaryWriter();
         }
     }
 
@@ -233,7 +229,7 @@
         mBinaryDictionary = null;
         mDictNameDictionaryUpdateController = getDictionaryUpdateController(dictName);
         // Currently, only dynamic personalization dictionary is updatable.
-        mDictionaryWriter = getDictionaryWriter(context, isUpdatable);
+        mDictionaryWriter = getDictionaryWriter(isUpdatable);
     }
 
     protected static String getDictNameWithLocale(final String name, final Locale locale) {
diff --git a/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java b/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java
index cc57d13..4a610e6 100644
--- a/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java
+++ b/java/src/com/android/inputmethod/latin/personalization/DecayingExpandableBinaryDictionaryBase.java
@@ -116,13 +116,6 @@
         return false;
     }
 
-    @Override
-    protected boolean matchesExpectedBinaryDictFormatVersionForThisType(final int formatVersion) {
-        // This class is using format 4 because it's used by all version 4 dictionaries.
-        // TODO: remove this when all dynamically generated dicts use version 4.
-        return formatVersion == REQUIRED_BINARY_DICTIONARY_VERSION;
-    }
-
     public void addMultipleDictionaryEntriesToDictionary(
             final ArrayList<LanguageModelParam> languageModelParams,
             final ExpandableBinaryDictionary.AddMultipleDictionaryEntriesCallback callback) {
