diff --git a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataNode.java b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataNode.java
index 86a8c6e..ad1bcc8 100644
--- a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataNode.java
+++ b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataNode.java
@@ -58,7 +58,7 @@
 import edu.uci.ics.asterix.transaction.management.exception.ACIDException;
 import edu.uci.ics.asterix.transaction.management.opcallbacks.PrimaryIndexModificationOperationCallback;
 import edu.uci.ics.asterix.transaction.management.opcallbacks.SecondaryIndexModificationOperationCallback;
-import edu.uci.ics.asterix.transaction.management.resource.TransactionalResourceRepository;
+import edu.uci.ics.asterix.transaction.management.resource.TransactionalResourceManagerRepository;
 import edu.uci.ics.asterix.transaction.management.service.transaction.DatasetId;
 import edu.uci.ics.asterix.transaction.management.service.transaction.DatasetIdFactory;
 import edu.uci.ics.asterix.transaction.management.service.transaction.IResourceManager.ResourceType;
@@ -282,13 +282,6 @@
     private IModificationOperationCallback createIndexModificationCallback(JobId jobId, long resourceId,
             IMetadataIndex metadataIndex, ILSMIndex lsmIndex, IndexOperation indexOp) throws Exception {
         TransactionContext txnCtx = transactionSubsystem.getTransactionManager().getTransactionContext(jobId);
-        TransactionalResourceRepository txnResourceRepository = transactionSubsystem
-                .getTransactionalResourceRepository();
-
-        if (txnResourceRepository.getTransactionalResource(resourceId) == null) {
-            transactionSubsystem.getTransactionalResourceRepository().registerTransactionalResource(resourceId,
-                    lsmIndex);
-        }
 
         int[] primaryKeyFields = metadataIndex.getPrimaryKeyIndexes();
         int numKeys = primaryKeyFields.length;
diff --git a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/api/IMetadataIndex.java b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/api/IMetadataIndex.java
index 9fe43fb..ca6ab08 100644
--- a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/api/IMetadataIndex.java
+++ b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/api/IMetadataIndex.java
@@ -68,16 +68,12 @@
 
     public void setFileId(int fileId);
 
-    public void initIndexLogger(IIndex index) throws ACIDException;
-
     public int getFileId();
 
     public void setResourceID(long resourceID);
 
     public long getResourceID();
 
-    public IndexLogger getIndexLogger();
-
     public DatasetId getDatasetId();
 
     boolean isPrimaryIndex();
diff --git a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/bootstrap/MetadataBootstrap.java b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/bootstrap/MetadataBootstrap.java
index 3fa891a..35dae4d 100644
--- a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/bootstrap/MetadataBootstrap.java
+++ b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/bootstrap/MetadataBootstrap.java
@@ -53,7 +53,7 @@
 import edu.uci.ics.asterix.transaction.management.resource.ILocalResourceMetadata;
 import edu.uci.ics.asterix.transaction.management.resource.LSMBTreeLocalResourceMetadata;
 import edu.uci.ics.asterix.transaction.management.resource.PersistentLocalResourceFactoryProvider;
-import edu.uci.ics.asterix.transaction.management.resource.TransactionalResourceRepository;
+import edu.uci.ics.asterix.transaction.management.resource.TransactionalResourceManagerRepository;
 import edu.uci.ics.asterix.transaction.management.service.logging.IndexResourceManager;
 import edu.uci.ics.asterix.transaction.management.service.transaction.IResourceManager.ResourceType;
 import edu.uci.ics.asterix.transaction.management.service.transaction.TransactionManagementConstants.LockManagerConstants.LockMode;
@@ -137,7 +137,7 @@
         initLocalIndexArrays();
 
         boolean isNewUniverse = true;
-        TransactionalResourceRepository resourceRepository = runtimeContext.getTransactionSubsystem()
+        TransactionalResourceManagerRepository resourceRepository = runtimeContext.getTransactionSubsystem()
                 .getTransactionalResourceRepository();
         resourceRepository.registerTransactionalResourceManager(ResourceType.LSM_BTREE, new IndexResourceManager(
                 ResourceType.LSM_BTREE, runtimeContext.getTransactionSubsystem()));
@@ -174,11 +174,9 @@
 
                 for (int i = 0; i < primaryIndexes.length; i++) {
                     enlistMetadataDataset(primaryIndexes[i], true);
-                    registerTransactionalResource(primaryIndexes[i], resourceRepository);
                 }
                 for (int i = 0; i < secondaryIndexes.length; i++) {
                     enlistMetadataDataset(secondaryIndexes[i], true);
-                    registerTransactionalResource(secondaryIndexes[i], resourceRepository);
                 }
                 insertInitialDataverses(mdTxnCtx);
                 insertInitialDatasets(mdTxnCtx);
@@ -198,11 +196,9 @@
         } else {
             for (int i = 0; i < primaryIndexes.length; i++) {
                 enlistMetadataDataset(primaryIndexes[i], false);
-                registerTransactionalResource(primaryIndexes[i], resourceRepository);
             }
             for (int i = 0; i < secondaryIndexes.length; i++) {
                 enlistMetadataDataset(secondaryIndexes[i], false);
-                registerTransactionalResource(secondaryIndexes[i], resourceRepository);
             }
             LOGGER.info("FINISHED ENLISTMENT OF METADATA B-TREES.");
         }
@@ -225,14 +221,6 @@
         }
     }
 
-    private static void registerTransactionalResource(IMetadataIndex metadataIndex,
-            TransactionalResourceRepository resourceRepository) throws ACIDException {
-        long resourceId = metadataIndex.getResourceID();
-        IIndex index = indexLifecycleManager.getIndex(resourceId);
-        resourceRepository.registerTransactionalResource(resourceId, index);
-        metadataIndex.initIndexLogger(index);
-    }
-
     public static void insertInitialDataverses(MetadataTransactionContext mdTxnCtx) throws Exception {
         String dataverseName = MetadataPrimaryIndexes.DATAVERSE_DATASET.getDataverseName();
         String dataFormat = NonTaggedDataFormat.NON_TAGGED_DATA_FORMAT;
diff --git a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/bootstrap/MetadataIndex.java b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/bootstrap/MetadataIndex.java
index 2bc9f4f..c0ce030 100644
--- a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/bootstrap/MetadataIndex.java
+++ b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/bootstrap/MetadataIndex.java
@@ -71,8 +71,6 @@
     protected int fileId;
     // Resource id of this index for use in transactions.
     protected long resourceId;
-    // Logger for tree indexes.
-    private IndexLogger indexLogger;
     // datasetId
     private final DatasetId datasetId;
     // Flag of primary index
@@ -235,11 +233,6 @@
     }
 
     @Override
-    public void initIndexLogger(IIndex index) throws ACIDException {
-        this.indexLogger = new IndexLogger(resourceId, ResourceType.LSM_BTREE, index);
-    }
-
-    @Override
     public int getFileId() {
         return fileId;
     }
@@ -249,10 +242,6 @@
         return payloadType;
     }
 
-    public IndexLogger getIndexLogger() {
-        return indexLogger;
-    }
-
     @Override
     public void setFile(FileReference file) {
         this.file = file;
diff --git a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/opcallbacks/PrimaryIndexModificationOperationCallbackFactory.java b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/opcallbacks/PrimaryIndexModificationOperationCallbackFactory.java
index af1cb9d..f3dee0c 100644
--- a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/opcallbacks/PrimaryIndexModificationOperationCallbackFactory.java
+++ b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/opcallbacks/PrimaryIndexModificationOperationCallbackFactory.java
@@ -16,7 +16,7 @@
 package edu.uci.ics.asterix.transaction.management.opcallbacks;
 
 import edu.uci.ics.asterix.transaction.management.exception.ACIDException;
-import edu.uci.ics.asterix.transaction.management.resource.TransactionalResourceRepository;
+import edu.uci.ics.asterix.transaction.management.resource.TransactionalResourceManagerRepository;
 import edu.uci.ics.asterix.transaction.management.service.transaction.ITransactionSubsystemProvider;
 import edu.uci.ics.asterix.transaction.management.service.transaction.JobId;
 import edu.uci.ics.asterix.transaction.management.service.transaction.TransactionContext;
@@ -24,6 +24,7 @@
 import edu.uci.ics.hyracks.api.context.IHyracksTaskContext;
 import edu.uci.ics.hyracks.api.dataflow.value.IBinaryHashFunctionFactory;
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
+import edu.uci.ics.hyracks.storage.am.common.api.IIndexLifecycleManager;
 import edu.uci.ics.hyracks.storage.am.common.api.IModificationOperationCallback;
 import edu.uci.ics.hyracks.storage.am.common.api.IModificationOperationCallbackFactory;
 import edu.uci.ics.hyracks.storage.am.common.ophelpers.IndexOperation;
@@ -48,14 +49,13 @@
     @Override
     public IModificationOperationCallback createModificationOperationCallback(long resourceId, Object resource,
             IHyracksTaskContext ctx) throws HyracksDataException {
-        TransactionSubsystem txnSubsystem = txnSubsystemProvider.getTransactionSubsystem(ctx);
-        TransactionalResourceRepository txnResourceRepository = txnSubsystem.getTransactionalResourceRepository();
-        ILSMIndex index = (ILSMIndex) txnResourceRepository.getTransactionalResource(resourceId);
 
-        //register the resource if it is not registered
+        TransactionSubsystem txnSubsystem = txnSubsystemProvider.getTransactionSubsystem(ctx);
+        IIndexLifecycleManager indexLifeCycleManager = txnSubsystem.getAsterixAppRuntimeContextProvider()
+                .getIndexLifecycleManager();
+        ILSMIndex index = (ILSMIndex) indexLifeCycleManager.getIndex(resourceId);
         if (index == null) {
-            txnSubsystem.getTransactionalResourceRepository().registerTransactionalResource(resourceId, resource);
-            index = (ILSMIndex) resource;
+            throw new HyracksDataException("Index(id:"+resourceId+") is not registered.");
         }
 
         try {
diff --git a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/opcallbacks/SecondaryIndexModificationOperationCallbackFactory.java b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/opcallbacks/SecondaryIndexModificationOperationCallbackFactory.java
index 3fede95..49f74bd 100644
--- a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/opcallbacks/SecondaryIndexModificationOperationCallbackFactory.java
+++ b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/opcallbacks/SecondaryIndexModificationOperationCallbackFactory.java
@@ -16,7 +16,7 @@
 package edu.uci.ics.asterix.transaction.management.opcallbacks;
 
 import edu.uci.ics.asterix.transaction.management.exception.ACIDException;
-import edu.uci.ics.asterix.transaction.management.resource.TransactionalResourceRepository;
+import edu.uci.ics.asterix.transaction.management.resource.TransactionalResourceManagerRepository;
 import edu.uci.ics.asterix.transaction.management.service.transaction.ITransactionSubsystemProvider;
 import edu.uci.ics.asterix.transaction.management.service.transaction.JobId;
 import edu.uci.ics.asterix.transaction.management.service.transaction.TransactionContext;
@@ -24,6 +24,7 @@
 import edu.uci.ics.hyracks.api.context.IHyracksTaskContext;
 import edu.uci.ics.hyracks.api.dataflow.value.IBinaryHashFunctionFactory;
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
+import edu.uci.ics.hyracks.storage.am.common.api.IIndexLifecycleManager;
 import edu.uci.ics.hyracks.storage.am.common.api.IModificationOperationCallback;
 import edu.uci.ics.hyracks.storage.am.common.api.IModificationOperationCallbackFactory;
 import edu.uci.ics.hyracks.storage.am.common.ophelpers.IndexOperation;
@@ -45,14 +46,13 @@
     @Override
     public IModificationOperationCallback createModificationOperationCallback(long resourceId, Object resource, IHyracksTaskContext ctx)
             throws HyracksDataException {
+        
         TransactionSubsystem txnSubsystem = txnSubsystemProvider.getTransactionSubsystem(ctx);
-        TransactionalResourceRepository txnResourceRepository = txnSubsystem.getTransactionalResourceRepository();
-        ILSMIndex index = (ILSMIndex) txnResourceRepository.getTransactionalResource(resourceId);
-
-        //register the resource if it is not registered
+        IIndexLifecycleManager indexLifeCycleManager = txnSubsystem.getAsterixAppRuntimeContextProvider()
+                .getIndexLifecycleManager();
+        ILSMIndex index = (ILSMIndex) indexLifeCycleManager.getIndex(resourceId);
         if (index == null) {
-            txnSubsystem.getTransactionalResourceRepository().registerTransactionalResource(resourceId, resource);
-            index = (ILSMIndex) resource;
+            throw new HyracksDataException("Index(id:"+resourceId+") is not registered.");
         }
         
         try {
diff --git a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/resource/TransactionalResourceRepository.java b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/resource/TransactionalResourceManagerRepository.java
similarity index 61%
rename from asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/resource/TransactionalResourceRepository.java
rename to asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/resource/TransactionalResourceManagerRepository.java
index 4532390..d38226b 100644
--- a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/resource/TransactionalResourceRepository.java
+++ b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/resource/TransactionalResourceManagerRepository.java
@@ -15,12 +15,10 @@
 
 package edu.uci.ics.asterix.transaction.management.resource;
 
-import java.nio.ByteBuffer;
 import java.util.HashMap;
 import java.util.Map;
 
 import edu.uci.ics.asterix.transaction.management.service.transaction.IResourceManager;
-import edu.uci.ics.asterix.transaction.management.service.transaction.MutableResourceId;
 
 /**
  * Represents a repository containing Resource Managers and Resources in the
@@ -31,25 +29,9 @@
  * recovery. An example of resource is a @see ITreeIndex that is managed by a
  * resource manager @see TreeResourceManager
  */
-public class TransactionalResourceRepository {
-
-    private Map<MutableResourceId, Object> resourceRepository = new HashMap<MutableResourceId, Object>(); // repository
+public class TransactionalResourceManagerRepository {
 
     private Map<Byte, IResourceManager> resourceMgrRepository = new HashMap<Byte, IResourceManager>(); // repository
-    
-    private MutableResourceId mutableResourceId = new MutableResourceId(0);
-
-    public void registerTransactionalResource(long resourceId, Object resource) {
-        synchronized (resourceRepository) {
-            mutableResourceId.setId(resourceId);
-//            MutableResourceId newMutableResourceId = new MutableResourceId(resourceId);
-//            resourceRepository.put(newMutableResourceId, resource);
-            if (resourceRepository.get(resourceId) == null) {
-                MutableResourceId newMutableResourceId = new MutableResourceId(resourceId);
-                resourceRepository.put(newMutableResourceId, resource);
-            }
-        }
-    }
 
     public void registerTransactionalResourceManager(byte id, IResourceManager resourceMgr) {
         synchronized (resourceMgrRepository) {
@@ -59,13 +41,6 @@
         }
     }
 
-    public Object getTransactionalResource(long resourceId) {
-        synchronized (resourceRepository) {
-            mutableResourceId.setId(resourceId);
-            return resourceRepository.get(mutableResourceId);
-        }
-    }
-
     public IResourceManager getTransactionalResourceMgr(byte id) {
         synchronized (resourceMgrRepository) {
             return resourceMgrRepository.get(id);
diff --git a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/IndexLoggerRepository.java b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/IndexLoggerRepository.java
index 7eefe37..da5042c 100644
--- a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/IndexLoggerRepository.java
+++ b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/IndexLoggerRepository.java
@@ -24,11 +24,11 @@
 public class IndexLoggerRepository {
 
     private final Map<MutableResourceId, IndexLogger> loggers = new HashMap<MutableResourceId, IndexLogger>();
-    private final TransactionSubsystem provider;
+    private final TransactionSubsystem txnSubsystem;
     private MutableResourceId mutableResourceId;
 
     public IndexLoggerRepository(TransactionSubsystem provider) {
-        this.provider = provider;
+        this.txnSubsystem = provider;
         mutableResourceId = new MutableResourceId(0);
     }
 
@@ -37,7 +37,8 @@
         IndexLogger logger = loggers.get(mutableResourceId);
         if (logger == null) {
             MutableResourceId newMutableResourceId = new MutableResourceId(resourceId);
-            IIndex index = (IIndex) provider.getTransactionalResourceRepository().getTransactionalResource(resourceId);
+            IIndex index = (IIndex) txnSubsystem.getAsterixAppRuntimeContextProvider().getIndexLifecycleManager()
+                    .getIndex(resourceId);
             logger = new IndexLogger(resourceId, resourceType, index);
             loggers.put(newMutableResourceId, logger);
         }
diff --git a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/IndexResourceManager.java b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/IndexResourceManager.java
index ca72204..7e4b5bb 100644
--- a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/IndexResourceManager.java
+++ b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/logging/IndexResourceManager.java
@@ -28,11 +28,11 @@
 
     public final byte resourceType;
 
-    private final TransactionSubsystem provider;
+    private final TransactionSubsystem txnSubsystem;
 
     public IndexResourceManager(byte resourceType, TransactionSubsystem provider) {
         this.resourceType = resourceType;
-        this.provider = provider;
+        this.txnSubsystem = provider;
     }
 
     public byte getResourceManagerId() {
@@ -46,7 +46,8 @@
         //TODO
         //replace TransactionResourceRepository with IndexLifeCycleManager
         // look up the repository to obtain the resource object
-        IIndex index = (IIndex) provider.getTransactionalResourceRepository().getTransactionalResource(resourceId);
+        IIndex index = (IIndex) txnSubsystem.getAsterixAppRuntimeContextProvider().getIndexLifecycleManager()
+                .getIndex(resourceId);
 
         /* field count */
         int fieldCount = logLocator.getBuffer().readInt(logLocator.getMemoryOffset() + offset);
@@ -112,7 +113,7 @@
         long resourceId = logRecordHelper.getResourceId(logLocator);
         int offset = logRecordHelper.getLogContentBeginPos(logLocator);
 
-        IIndex index = (IIndex) provider.getAsterixAppRuntimeContextProvider().getIndexLifecycleManager()
+        IIndex index = (IIndex) txnSubsystem.getAsterixAppRuntimeContextProvider().getIndexLifecycleManager()
                 .getIndex(resourceId);
 
         /* field count */
diff --git a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/recovery/CheckpointObject.java b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/recovery/CheckpointObject.java
index b9dd59f..4d1b9a5 100644
--- a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/recovery/CheckpointObject.java
+++ b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/recovery/CheckpointObject.java
@@ -6,21 +6,15 @@
 
     private static final long serialVersionUID = 1L;
     
-    private final long checkpointLSN;
     private final long minMCTFirstLSN;
     private final int maxJobId;
     private final long timeStamp;
 
-    public CheckpointObject(long checkpointLSN, long minMCTFirstLSN, int maxJobId, long timeStamp) {
-        this.checkpointLSN = checkpointLSN;
+    public CheckpointObject(long minMCTFirstLSN, int maxJobId, long timeStamp) {
         this.minMCTFirstLSN = minMCTFirstLSN;
         this.maxJobId = maxJobId;
         this.timeStamp = timeStamp;
     }
-    
-    public long getCheckpointLSN() {
-        return checkpointLSN;
-    }
 
     public long getMinMCTFirstLSN() {
         return minMCTFirstLSN;
diff --git a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/recovery/RecoveryManager.java b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/recovery/RecoveryManager.java
index 18e7be1..8bb1acf 100644
--- a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/recovery/RecoveryManager.java
+++ b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/recovery/RecoveryManager.java
@@ -38,7 +38,7 @@
 import edu.uci.ics.asterix.transaction.management.resource.LSMBTreeLocalResourceMetadata;
 import edu.uci.ics.asterix.transaction.management.resource.LSMInvertedIndexLocalResourceMetadata;
 import edu.uci.ics.asterix.transaction.management.resource.LSMRTreeLocalResourceMetadata;
-import edu.uci.ics.asterix.transaction.management.resource.TransactionalResourceRepository;
+import edu.uci.ics.asterix.transaction.management.resource.TransactionalResourceManagerRepository;
 import edu.uci.ics.asterix.transaction.management.service.logging.IBuffer;
 import edu.uci.ics.asterix.transaction.management.service.logging.ILogCursor;
 import edu.uci.ics.asterix.transaction.management.service.logging.ILogFilter;
@@ -84,13 +84,6 @@
 
     public RecoveryManager(TransactionSubsystem TransactionProvider) throws ACIDException {
         this.txnSubsystem = TransactionProvider;
-        /**********
-         * try {
-         * FileUtil.createFileIfNotExists(checkpoint_record_file);
-         * } catch (IOException ioe) {
-         * throw new ACIDException(" unable to create checkpoint record file " + checkpoint_record_file, ioe);
-         * }
-         ***********/
     }
 
     /**
@@ -114,10 +107,9 @@
             new ACIDException("Checkpoint file doesn't exist", e);
         }
 
-        //#. if checkpointLSN in the checkpoint file is equal to the lastLSN in the log file, 
+        //#. if minMCTFirstLSN is equal to -1,
         //   then return healthy state. Otherwise, return corrupted.
-        LogManager logMgr = (LogManager) txnSubsystem.getLogManager();
-        if (checkpointObject.getCheckpointLSN() == logMgr.getCurrentLsn().get()) {
+        if (checkpointObject.getMinMCTFirstLSN() == -1) {
             state = SystemState.HEALTHY;
             return state;
         } else {
@@ -137,7 +129,7 @@
         ILogManager logManager = txnSubsystem.getLogManager();
         ILogRecordHelper logRecordHelper = logManager.getLogRecordHelper();
         ITransactionManager txnManager = txnSubsystem.getTransactionManager();
-        TransactionalResourceRepository txnResourceRepository = txnSubsystem.getTransactionalResourceRepository();
+        TransactionalResourceManagerRepository txnResourceRepository = txnSubsystem.getTransactionalResourceRepository();
 
         //winnerTxnTable is used to add pairs, <committed TxnId, the most recent commit LSN of the TxnId>
         Map<TxnId, Long> winnerTxnTable = new HashMap<TxnId, Long>();
@@ -276,7 +268,7 @@
                                 txnSubsystem.getTransactionalResourceRepository().registerTransactionalResourceManager(
                                         resourceMgrId, resourceMgr);
                             }
-                            
+
                             //redo finally.
                             resourceMgr.redo(logRecordHelper, currentLogLocator);
                         }
@@ -307,9 +299,9 @@
         //#. create and store the checkpointObject into the new checkpoint file
         //TODO
         //put the correct minMCTFirstLSN by getting from Zach. :)
-        long minMCTFirstLSM = 0;
-        CheckpointObject checkpointObject = new CheckpointObject(logMgr.getCurrentLsn().get(), minMCTFirstLSM,
-                txnMgr.getMaxJobId(), System.currentTimeMillis());
+        long minMCTFirstLSM = -1;
+        CheckpointObject checkpointObject = new CheckpointObject(minMCTFirstLSM, txnMgr.getMaxJobId(),
+                System.currentTimeMillis());
 
         FileOutputStream fos = null;
         ObjectOutputStream oosToFos = null;
diff --git a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/transaction/TransactionSubsystem.java b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/transaction/TransactionSubsystem.java
index ce9a280..1fc2765 100644
--- a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/transaction/TransactionSubsystem.java
+++ b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/transaction/TransactionSubsystem.java
@@ -15,7 +15,7 @@
 package edu.uci.ics.asterix.transaction.management.service.transaction;
 
 import edu.uci.ics.asterix.transaction.management.exception.ACIDException;
-import edu.uci.ics.asterix.transaction.management.resource.TransactionalResourceRepository;
+import edu.uci.ics.asterix.transaction.management.resource.TransactionalResourceManagerRepository;
 import edu.uci.ics.asterix.transaction.management.service.locking.ILockManager;
 import edu.uci.ics.asterix.transaction.management.service.locking.LockManager;
 import edu.uci.ics.asterix.transaction.management.service.logging.ILogManager;
@@ -35,7 +35,7 @@
     private final ILockManager lockManager;
     private final ITransactionManager transactionManager;
     private final IRecoveryManager recoveryManager;
-    private final TransactionalResourceRepository resourceRepository;
+    private final TransactionalResourceManagerRepository resourceRepository;
     private final IndexLoggerRepository loggerRepository;
     private final IAsterixAppRuntimeContextProvider asterixAppRuntimeContextProvider;
 
@@ -47,7 +47,7 @@
         this.lockManager = new LockManager(this);
         this.recoveryManager = new RecoveryManager(this);
         this.loggerRepository = new IndexLoggerRepository(this);
-        this.resourceRepository = new TransactionalResourceRepository();
+        this.resourceRepository = new TransactionalResourceManagerRepository();
         this.asterixAppRuntimeContextProvider = asterixAppRuntimeContextProvider;
     }
 
@@ -67,7 +67,7 @@
         return recoveryManager;
     }
 
-    public TransactionalResourceRepository getTransactionalResourceRepository() {
+    public TransactionalResourceManagerRepository getTransactionalResourceRepository() {
         return resourceRepository;
     }
 
