diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/compressors/FieldPrefixCompressor.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/compressors/FieldPrefixCompressor.java
index e383eec..c02b062 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/compressors/FieldPrefixCompressor.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/compressors/FieldPrefixCompressor.java
@@ -1,65 +1,63 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.compressors;
+package edu.uci.ics.asterix.indexing.btree.compressors;
 
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
 
-import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
-import edu.uci.ics.hyracks.storage.am.btree.frames.FieldPrefixNSMLeaf;
-import edu.uci.ics.hyracks.storage.am.btree.impls.FieldIterator;
-import edu.uci.ics.hyracks.storage.am.btree.impls.FieldPrefixSlotManager;
-import edu.uci.ics.hyracks.storage.am.btree.impls.MultiComparator;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IComparator;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IFieldAccessor;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IFrameCompressor;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IPrefixSlotManager;
+import edu.uci.ics.asterix.common.exceptions.AsterixException;
+import edu.uci.ics.asterix.indexing.btree.frames.FieldPrefixNSMLeaf;
+import edu.uci.ics.asterix.indexing.btree.impls.FieldIterator;
+import edu.uci.ics.asterix.indexing.btree.impls.FieldPrefixSlotManager;
+import edu.uci.ics.asterix.indexing.btree.impls.MultiComparator;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IComparator;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IFieldAccessor;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IFrameCompressor;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IPrefixSlotManager;
 
 public class FieldPrefixCompressor implements IFrameCompressor {
+		
+	// minimum ratio of uncompressed records to total records to consider re-compression
+	private float ratioThreshold;
 	
-	public void compress(FieldPrefixNSMLeaf frame, MultiComparator cmp) throws HyracksDataException {
-    	int numRecords = frame.getNumRecords();       
-        //System.out.println("NUMRECORDS: " + numRecords);
+	// minimum number of records matching field prefixes to consider compressing them 
+	private int occurrenceThreshold;
+	
+	public FieldPrefixCompressor(float ratioThreshold, int occurrenceThreshold) {
+		this.ratioThreshold = ratioThreshold;
+		this.occurrenceThreshold = occurrenceThreshold;
+	}
+	
+	@Override
+	public boolean compress(FieldPrefixNSMLeaf frame, MultiComparator cmp) throws Exception {		
+		int numRecords = frame.getNumRecords();
     	if(numRecords <= 0) {
             frame.setNumPrefixRecords(0);
             frame.setFreeSpaceOff(frame.getOrigFreeSpaceOff());
             frame.setTotalFreeSpace(frame.getOrigTotalFreeSpace());
-            return;
+            return false;
         }
-        
+    	
+    	int numUncompressedRecords = frame.getNumUncompressedRecords();
+    	float ratio = (float)numUncompressedRecords / (float)numRecords;    	
+    	if(ratio < ratioThreshold) return false;
+    	
         IComparator[] cmps = cmp.getComparators();
         IFieldAccessor[] fields = cmp.getFields();
         
         ByteBuffer buf = frame.getBuffer();
         byte[] pageArray = buf.array();
         IPrefixSlotManager slotManager = frame.slotManager;
-        
-        int occurrenceThreshold = 2;
-        
+                
         // perform analysis pass
         ArrayList<KeyPartition> keyPartitions = getKeyPartitions(frame, cmp, occurrenceThreshold);
-        if(keyPartitions.size() == 0) return;
-        
-        //System.out.println("KEYPARTITIONS: " + keyPartitions.size());
+        if(keyPartitions.size() == 0) return false;
         
         // for each keyPartition, determine the best prefix length for compression, and count how many prefix records we would need in total
         int totalSlotsNeeded = 0;
         int totalPrefixBytes = 0;
-        for(KeyPartition kp : keyPartitions) {                                	
+        for(KeyPartition kp : keyPartitions) {        	
+        	         	
         	for(int j = 0; j < kp.pmi.length; j++) {
                 int benefitMinusCost = kp.pmi[j].spaceBenefit - kp.pmi[j].spaceCost;            
                 if(benefitMinusCost > kp.maxBenefitMinusCost) {
@@ -68,11 +66,13 @@
                 }
             }
         	        	
-            if(kp.maxBenefitMinusCost <= 0) continue; // ignore keyPartitions with no benefit
+        	// ignore keyPartitions with no benefit and don't count bytes and slots needed
+        	if(kp.maxBenefitMinusCost <= 0) continue; 
             
             totalPrefixBytes += kp.pmi[kp.maxPmiIndex].prefixBytes;
             totalSlotsNeeded += kp.pmi[kp.maxPmiIndex].prefixSlotsNeeded;
         }
+        
         //System.out.println("TOTAL SLOTS NEEDED: " + totalSlotsNeeded);
         
         // we use a greedy heuristic to solve this "knapsack"-like problem
@@ -128,6 +128,7 @@
         int kpIndex = 0;
         int recSlotNum = 0;
         int prefixSlotNum = 0;
+        numUncompressedRecords = 0;
         FieldIterator recToWrite = new FieldIterator(fields, frame);
         while(recSlotNum < numRecords) {           
             if(kpIndex < keyPartitions.size()) {
@@ -175,11 +176,12 @@
                         		    newRecordSlots[numRecords - 1 - slotNum] = slotManager.encodeSlotFields(FieldPrefixSlotManager.RECORD_UNCOMPRESSED, recordFreeSpace);
                         		    recordFreeSpace += recToWrite.copyFields(0, fields.length - 1, buffer, recordFreeSpace);
                         		}
+                        		numUncompressedRecords += recordsInSegment;
                         	}
                         	else {
                         	    // segment has enough records, compress segment
-                        		// extract prefix, write prefix record to buffer, and set prefix slot
-                        	    newPrefixSlots[newPrefixSlots.length - 1 - prefixSlotNum] = slotManager.encodeSlotFields(numFieldsToCompress, prefixFreeSpace);
+                        		// extract prefix, write prefix record to buffer, and set prefix slot                        	    
+                        		newPrefixSlots[newPrefixSlots.length - 1 - prefixSlotNum] = slotManager.encodeSlotFields(numFieldsToCompress, prefixFreeSpace);
                         	    //int tmp = freeSpace;
                         	    //prevRec.reset();
                         	    //System.out.println("SOURCE CONTENTS: " + buf.getInt(prevRec.getFieldOff()) + " " + buf.getInt(prevRec.getFieldOff()+4));
@@ -214,6 +216,7 @@
             	    recToWrite.openRecSlotNum(recSlotNum);
             	    newRecordSlots[numRecords - 1 - recSlotNum] = slotManager.encodeSlotFields(FieldPrefixSlotManager.RECORD_UNCOMPRESSED, recordFreeSpace);
             	    recordFreeSpace += recToWrite.copyFields(0, fields.length - 1, buffer, recordFreeSpace);
+            	    numUncompressedRecords++;
             	}
             }
             else {
@@ -221,20 +224,21 @@
                 recToWrite.openRecSlotNum(recSlotNum);
                 newRecordSlots[numRecords - 1 - recSlotNum] = slotManager.encodeSlotFields(FieldPrefixSlotManager.RECORD_UNCOMPRESSED, recordFreeSpace);
                 recordFreeSpace += recToWrite.copyFields(0, fields.length - 1, buffer, recordFreeSpace);
+                numUncompressedRecords++;
             }   
             recSlotNum++;
         }            
         
         // sanity check to see if we have written exactly as many prefix bytes as computed before
         if(prefixFreeSpace != frame.getOrigFreeSpaceOff() + totalPrefixBytes) {
-        	throw new HyracksDataException("ERROR: Number of prefix bytes written don't match computed number");
+        	throw new AsterixException("ERROR: Number of prefix bytes written don't match computed number");
         }
                 
         // in some rare instances our procedure could even increase the space requirement which is very dangerous
         // this can happen to to the greedy solution of the knapsack-like problem
         // therefore, we check if the new space exceeds the page size to avoid the only danger of an increasing space
         int totalSpace = recordFreeSpace + newRecordSlots.length * slotManager.getSlotSize() + newPrefixSlots.length * slotManager.getSlotSize();
-        if(totalSpace > buf.capacity()) return; // just leave the page as is
+        if(totalSpace > buf.capacity()) return false; // just leave the page as is
         
         // copy new records and new slots into original page
         int freeSpaceAfterInit = frame.getOrigFreeSpaceOff();
@@ -268,8 +272,11 @@
         // update space fields, TODO: we need to update more fields 
         frame.setFreeSpaceOff(recordFreeSpace);
         frame.setNumPrefixRecords(newPrefixSlots.length);
+        frame.setNumUncompressedRecords(numUncompressedRecords);
         int totalFreeSpace = buf.capacity() - recordFreeSpace - ((newRecordSlots.length + newPrefixSlots.length) * slotManager.getSlotSize());
         frame.setTotalFreeSpace(totalFreeSpace);
+        
+        return true;
     }
 	
     // we perform an analysis pass over the records to determine the costs and benefits of different compression options
@@ -306,19 +313,7 @@
             int prefixFieldsMatch = 0;            
             int prefixBytes = 0; // counts the bytes of the common prefix fields
             
-            for(int j = 0; j < maxCmps; j++) {            	                
-                // debug
-            	if(rec.getFieldOff() > 50000) {
-                	System.out.println("NUMRECORDS: " + numRecords + " " + frame.getNumPrefixRecords());
-                	int recSlotOff = slotManager.getRecSlotOff(i);
-                	int recSlot = buf.getInt(recSlotOff);
-                	int prefixSlotNum = slotManager.decodeFirstSlotField(recSlot);
-                	int recOff = slotManager.decodeSecondSlotField(recSlot);
-                	
-                	System.out.println("HERE: " + recSlotOff + " " + recSlot + " " + prefixSlotNum + " " + recOff);
-                	String keys = frame.printKeys(cmp);
-                	System.out.println(keys);
-                }
+            for(int j = 0; j < maxCmps; j++) {                
             	            	
             	if(cmps[j].compare(pageArray, prevRec.getFieldOff(), pageArray, rec.getFieldOff()) == 0) {
                     prefixFieldsMatch++;
@@ -386,26 +381,15 @@
         public PrefixMatchInfo[] pmi;
         
         public int maxBenefitMinusCost = 0;
-        public int maxPmiIndex = -1;
-        
-        public int totalUncompressedSpace = 0;
+        public int maxPmiIndex = -1;        
+        // number of fields used for compression for this kp of current page
         
         public KeyPartition(int numKeyFields) {
             pmi = new PrefixMatchInfo[numKeyFields];
             for(int i = 0; i < numKeyFields; i++) {
                 pmi[i] = new PrefixMatchInfo();
             }
-        }
-        
-        void print() {
-            for(int i = 0; i < pmi.length; i++) {
-                System.out.println("PMI: " + i + " | " 
-                        + "MATCHES: " + pmi[i].matches + " | "                         
-                        + "SPACECOST: " + pmi[i].spaceCost + " | "
-                        + "SPACEBENEFIT: " + pmi[i].spaceBenefit + " | "
-                        + "SLOTSNEEDED: " + pmi[i].prefixSlotsNeeded);
-            }
-        }     
+        }        
     }    
     
     private class SortByHeuristic implements Comparator<KeyPartition>{
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/frames/FieldPrefixNSMLeaf.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/frames/FieldPrefixNSMLeaf.java
index 02a9c9e..860f75f 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/frames/FieldPrefixNSMLeaf.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/frames/FieldPrefixNSMLeaf.java
@@ -1,39 +1,25 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.frames;
+package edu.uci.ics.asterix.indexing.btree.frames;
 
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.Collections;
 
-import edu.uci.ics.hyracks.storage.am.btree.compressors.FieldPrefixCompressor;
-import edu.uci.ics.hyracks.storage.am.btree.impls.BTreeException;
-import edu.uci.ics.hyracks.storage.am.btree.impls.FieldIterator;
-import edu.uci.ics.hyracks.storage.am.btree.impls.FieldPrefixSlotManager;
-import edu.uci.ics.hyracks.storage.am.btree.impls.MultiComparator;
-import edu.uci.ics.hyracks.storage.am.btree.impls.SlotOffRecOff;
-import edu.uci.ics.hyracks.storage.am.btree.impls.SplitKey;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrame;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrameLeaf;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IComparator;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IFieldAccessor;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IFrameCompressor;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IPrefixSlotManager;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.ISlotManager;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.SpaceStatus;
-import edu.uci.ics.hyracks.storage.common.buffercache.ICachedPage;
+import edu.uci.ics.asterix.indexing.btree.compressors.FieldPrefixCompressor;
+import edu.uci.ics.asterix.indexing.btree.impls.BTreeException;
+import edu.uci.ics.asterix.indexing.btree.impls.FieldIterator;
+import edu.uci.ics.asterix.indexing.btree.impls.FieldPrefixSlotManager;
+import edu.uci.ics.asterix.indexing.btree.impls.MultiComparator;
+import edu.uci.ics.asterix.indexing.btree.impls.SlotOffRecOff;
+import edu.uci.ics.asterix.indexing.btree.impls.SplitKey;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrame;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrameLeaf;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IComparator;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IFieldAccessor;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IFrameCompressor;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IPrefixSlotManager;
+import edu.uci.ics.asterix.indexing.btree.interfaces.ISlotManager;
+import edu.uci.ics.asterix.indexing.btree.interfaces.SpaceStatus;
+import edu.uci.ics.asterix.storage.buffercache.ICachedPage;
 
 public class FieldPrefixNSMLeaf implements IBTreeFrameLeaf {
 	
@@ -42,20 +28,21 @@
     protected static final int freeSpaceOff = numRecordsOff + 4;      		// 8
     protected static final int totalFreeSpaceOff = freeSpaceOff + 4;        // 12	
 	protected static final int levelOff = totalFreeSpaceOff + 4;         	// 16
-	protected static final int smFlagOff = levelOff + 1;                   	// 20
-	protected static final int numPrefixRecordsOff = smFlagOff + 1; 		// 21
+	protected static final int smFlagOff = levelOff + 1;                   	// 17
+	protected static final int numUncompressedRecordsOff = smFlagOff + 1;				// 18
+	protected static final int numPrefixRecordsOff = numUncompressedRecordsOff + 4; 		// 21
 	
 	protected static final int prevLeafOff = numPrefixRecordsOff + 4;		// 22
 	protected static final int nextLeafOff = prevLeafOff + 4;				// 26
 	
 	protected ICachedPage page = null;
     protected ByteBuffer buf = null;
-    protected IFrameCompressor compressor;
+    public IFrameCompressor compressor;
     public IPrefixSlotManager slotManager; // TODO: should be protected, but will trigger some refactoring
     
     public FieldPrefixNSMLeaf() {
         this.slotManager = new FieldPrefixSlotManager();
-        this.compressor = new FieldPrefixCompressor();        
+        this.compressor = new FieldPrefixCompressor(0.001f, 2);        
     }
     
     @Override
@@ -76,8 +63,8 @@
     }
         
     @Override
-    public void compress(MultiComparator cmp) throws Exception {
-        compressor.compress(this, cmp);
+    public boolean compress(MultiComparator cmp) throws Exception {
+        return compressor.compress(this, cmp);
     }
     
     // assumptions: 
@@ -254,6 +241,7 @@
         buf.putInt(pageLsnOff, 0); // TODO: might to set to a different lsn during creation
         buf.putInt(numRecordsOff, 0);   
         resetSpaceParams();
+        buf.putInt(numUncompressedRecordsOff, 0);
         buf.putInt(numPrefixRecordsOff, 0);
         buf.put(levelOff, level);
         buf.put(smFlagOff, (byte)0);
@@ -270,7 +258,7 @@
     }
     
     @Override
-    public void insert(byte[] data, MultiComparator cmp) throws Exception {        
+    public void insert(byte[] data, MultiComparator cmp) throws Exception {    	
     	int slot = slotManager.findSlot(buf, data, cmp, false);        
         slot = slotManager.insertSlot(slot, buf.getInt(freeSpaceOff));
         
@@ -294,17 +282,20 @@
             for(int i = numPrefixFields; i < cmp.getFields().length; i++) {
                 suffixSize += cmp.getFields()[i].getLength(data, suffixSize);
             }
-            suffixSize -= suffixStartOff;                        
+            suffixSize -= suffixStartOff;                  
+        }
+        else {
+        	buf.putInt(numUncompressedRecordsOff, buf.getInt(numUncompressedRecordsOff) + 1);
         }
         
         int freeSpace = buf.getInt(freeSpaceOff);
-        System.arraycopy(data, suffixStartOff, buf.array(), freeSpace, suffixSize);            
+        System.arraycopy(data, suffixStartOff, buf.array(), freeSpace, suffixSize);                    
         buf.putInt(numRecordsOff, buf.getInt(numRecordsOff) + 1);
         buf.putInt(freeSpaceOff, buf.getInt(freeSpaceOff) + suffixSize);
         buf.putInt(totalFreeSpaceOff, buf.getInt(totalFreeSpaceOff) - suffixSize - slotManager.getSlotSize());
                
         //System.out.println(buf.getInt(totalFreeSpaceOff) + " " + buf.getInt(freeSpaceOff) + " " + buf.getInt(numRecordsOff));        
-        //System.out.println("COPIED: " + suffixSize + " / " + data.length);
+        //System.out.println("COPIED: " + suffixSize + " / " + data.length);      
     }
     
     public void verifyPrefixes(MultiComparator cmp) {
@@ -434,10 +425,6 @@
     @Override
     public int split(IBTreeFrame rightFrame, byte[] data, MultiComparator cmp, SplitKey splitKey) throws Exception {
     	    	
-    	//System.out.println("ORIG");
-    	//String orig = printKeys(cmp);
-    	//System.out.println(orig);
-    	
     	FieldPrefixNSMLeaf rf = (FieldPrefixNSMLeaf)rightFrame;
     	
     	// before doing anything check if key already exists
@@ -555,7 +542,7 @@
 		
 		right.putInt(numRecordsOff, recordsToRight);
 		right.putInt(numPrefixRecordsOff, prefixesToRight);
-				
+		
 		// on left page move slots to reflect possibly removed prefixes
 		src = slotManager.getRecSlotEndOff() + recordsToRight * slotManager.getSlotSize();
 		dest = slotManager.getRecSlotEndOff() + recordsToRight * slotManager.getSlotSize() + (numPrefixRecords - prefixesToLeft) * slotManager.getSlotSize();
@@ -563,33 +550,11 @@
 		System.arraycopy(buf.array(), src, buf.array(), dest, length);
 		
 		buf.putInt(numRecordsOff, recordsToLeft);
-		buf.putInt(numPrefixRecordsOff, prefixesToLeft);	
-					
-		
-		//System.out.println("VERIFY LEFT");
-		//verifyPrefixes(cmp);
-		
-		//System.out.println("VERIFY RIGHT");
-		//rf.verifyPrefixes(cmp);
-		
-		String a = printKeys(cmp);
-		String b = rightFrame.printKeys(cmp);		 
-		//System.out.println("BEFORE COMPACT");
-		//System.out.println(a);		
-		//System.out.println(b);
-		
+		buf.putInt(numPrefixRecordsOff, prefixesToLeft);		
+				
 		// compact both pages		
 		compact(cmp);
 		rightFrame.compact(cmp);
-						
-		a = printKeys(cmp);
-		b = rightFrame.printKeys(cmp);		 
-		//System.out.println("AFTER COMPACT");
-		//System.out.println(a);		
-		//System.out.println(b);
-		
-		//System.out.println("AFTER SPLIT REC: " + getNumRecords() + " " + rightFrame.getNumRecords());
-		//System.out.println("AFTER SPLIT TOT: " + getTotalFreeSpace() + " " + rightFrame.getTotalFreeSpace());
 		
 		// insert last key
 		targetFrame.insert(data, cmp);			
@@ -643,4 +608,12 @@
 	public int getPrevLeaf() {
 		return buf.getInt(prevLeafOff);
 	}
+	
+	public int getNumUncompressedRecords() {
+		return buf.getInt(numUncompressedRecordsOff);
+	}
+	
+	public void setNumUncompressedRecords(int numUncompressedRecords) {
+		buf.putInt(numUncompressedRecordsOff, numUncompressedRecords);
+	}
 }
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/frames/FieldPrefixNSMLeafFactory.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/frames/FieldPrefixNSMLeafFactory.java
index b01dc4b..951e0e2 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/frames/FieldPrefixNSMLeafFactory.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/frames/FieldPrefixNSMLeafFactory.java
@@ -1,21 +1,7 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.frames;
+package edu.uci.ics.asterix.indexing.btree.frames;
 
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrameLeaf;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrameLeafFactory;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrameLeaf;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrameLeafFactory;
 
 public class FieldPrefixNSMLeafFactory implements IBTreeFrameLeafFactory {
 	@Override
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTree.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTree.java
index 50137cf..6ae6622 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTree.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTree.java
@@ -1,50 +1,35 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.impls;
+package edu.uci.ics.asterix.indexing.btree.impls;
 
 import java.util.ArrayList;
 import java.util.Stack;
 import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 import java.util.logging.Level;
-import java.util.logging.Logger;
 
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeCursor;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrame;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrameInterior;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrameInteriorFactory;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrameLeaf;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrameLeafFactory;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrameMeta;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.ISlotManager;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.ISlotManagerFactory;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.SpaceStatus;
-import edu.uci.ics.hyracks.storage.common.buffercache.IBufferCache;
-import edu.uci.ics.hyracks.storage.common.buffercache.ICachedPage;
-import edu.uci.ics.hyracks.storage.common.file.FileInfo;
+import edu.uci.ics.asterix.common.config.GlobalConfig;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeCursor;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrame;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrameInterior;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrameInteriorFactory;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrameLeaf;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrameLeafFactory;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrameMeta;
+import edu.uci.ics.asterix.indexing.btree.interfaces.ISlotManager;
+import edu.uci.ics.asterix.indexing.btree.interfaces.ISlotManagerFactory;
+import edu.uci.ics.asterix.indexing.btree.interfaces.SpaceStatus;
+import edu.uci.ics.asterix.storage.buffercache.IBufferCache;
+import edu.uci.ics.asterix.storage.buffercache.ICachedPage;
+import edu.uci.ics.asterix.storage.file.FileInfo;
 
 public class BTree {
-    private static final Logger LOGGER = Logger.getLogger(BTree.class.getName());
-
+	
     private final static int RESTART_OP = Integer.MIN_VALUE;
     private final static int MAX_RESTARTS = 10;
 
     private final int metaDataPage = 0; // page containing meta data, e.g.,
                                         // maxPage
     private final int rootPage = 1; // the root page never changes
-
+    
     private final IBufferCache bufferCache;
     private int fileId;
     private final IBTreeFrameInteriorFactory interiorFrameFactory;
@@ -53,7 +38,7 @@
     private final ISlotManagerFactory leafSlotManagerFactory;
     private final MultiComparator cmp;
     private final ReadWriteLock treeLatch;
-
+    
     public int rootSplits = 0;
     public int[] splitsByLevel = new int[500];
     public long readLatchesAcquired = 0;
@@ -70,7 +55,7 @@
 
     public int usefulCompression = 0;
     public int uselessCompression = 0;
-
+    
     public String printStats() {
         StringBuilder strBuilder = new StringBuilder();
         strBuilder.append("\n");
@@ -96,12 +81,12 @@
         this.cmp = cmp;
         this.treeLatch = new ReentrantReadWriteLock(true);
     }
-
+    
     public void create(int fileId, IBTreeFrameLeaf leafFrame, IBTreeFrameMeta metaFrame) throws Exception {
         // initialize meta data page
         ICachedPage metaNode = bufferCache.pin(FileInfo.getDiskPageId(fileId, metaDataPage), false);
         pins++;
-
+        
         metaNode.acquireWriteLatch();
         writeLatchesAcquired++;
         try {
@@ -114,11 +99,11 @@
             bufferCache.unpin(metaNode);
             unpins++;
         }
-
+        
         // initialize root page
         ICachedPage rootNode = bufferCache.pin(FileInfo.getDiskPageId(fileId, rootPage), true);
         pins++;
-
+        
         rootNode.acquireWriteLatch();
         writeLatchesAcquired++;
         try {
@@ -126,7 +111,7 @@
             leafFrame.initBuffer((byte) 0);
         } finally {
             rootNode.releaseWriteLatch();
-            writeLatchesReleased++;
+            writeLatchesReleased++;            
             bufferCache.unpin(rootNode);
             unpins++;
         }
@@ -144,10 +129,10 @@
     private int getFreePage(IBTreeFrameMeta metaFrame) throws Exception {
         ICachedPage metaNode = bufferCache.pin(FileInfo.getDiskPageId(fileId, metaDataPage), false);
         pins++;
-
+        
         metaNode.acquireWriteLatch();
         writeLatchesAcquired++;
-
+        
         int freePage = -1;
         try {
             metaFrame.setPage(metaNode);
@@ -157,7 +142,7 @@
                 if (nextPage > 0) { // sibling may have free pages
                     ICachedPage nextNode = bufferCache.pin(FileInfo.getDiskPageId(fileId, nextPage), false);
                     pins++;
-
+                    
                     nextNode.acquireWriteLatch();
                     writeLatchesAcquired++;
                     // we copy over the free space entries of nextpage into the
@@ -171,9 +156,8 @@
                         // copy entire page (including sibling pointer, free
                         // page entries, and all other info)
                         // after this copy nextPage is considered a free page
-                        System.arraycopy(nextNode.getBuffer().array(), 0, metaNode.getBuffer().array(), 0, nextNode
-                                .getBuffer().capacity());
-
+                        System.arraycopy(nextNode.getBuffer().array(), 0, metaNode.getBuffer().array(), 0, nextNode.getBuffer().capacity());
+                        
                         // reset unchanged entry
                         metaFrame.setMaxPage(maxPage);
 
@@ -206,7 +190,7 @@
 
         return freePage;
     }
-
+    
     private void addFreePages(BTreeOpContext ctx) throws Exception {
         for (Integer i : ctx.freePages) {
             addFreePage(ctx.metaFrame, i);
@@ -216,101 +200,102 @@
 
     private void addFreePage(IBTreeFrameMeta metaFrame, int freePage) throws Exception {
         // root page is special, don't add it to free pages
-        if (freePage == rootPage)
-            return;
-
+        if (freePage == rootPage) return;
+        
         ICachedPage metaNode = bufferCache.pin(FileInfo.getDiskPageId(fileId, metaDataPage), false);
         pins++;
-
+        
         metaNode.acquireWriteLatch();
         writeLatchesAcquired++;
-
+        
         metaFrame.setPage(metaNode);
 
         try {
-            if (metaFrame.hasSpace()) {
-                metaFrame.addFreePage(freePage);
-            } else {
+            if(metaFrame.hasSpace()) {
+                metaFrame.addFreePage(freePage);                
+            }
+            else {                
                 // allocate a new page in the chain of meta pages
                 int newPage = metaFrame.getFreePage();
-                if (newPage < 0) {
+                if(newPage < 0) {
                     throw new Exception("Inconsistent Meta Page State. It has no space, but it also has no entries.");
                 }
-
+                
                 ICachedPage newNode = bufferCache.pin(FileInfo.getDiskPageId(fileId, newPage), false);
                 pins++;
-
+                
                 newNode.acquireWriteLatch();
                 writeLatchesAcquired++;
-
-                try {
+                
+                
+                try {                
                     int metaMaxPage = metaFrame.getMaxPage();
 
                     // copy metaDataPage to newNode
-                    System.arraycopy(metaNode.getBuffer().array(), 0, newNode.getBuffer().array(), 0, metaNode
-                            .getBuffer().capacity());
-
+                    System.arraycopy(metaNode.getBuffer().array(), 0, newNode.getBuffer().array(), 0, metaNode.getBuffer().capacity());
+                    
                     metaFrame.initBuffer(-1);
                     metaFrame.setNextPage(newPage);
                     metaFrame.setMaxPage(metaMaxPage);
-                    metaFrame.addFreePage(freePage);
+                    metaFrame.addFreePage(freePage);              
                 } finally {
                     newNode.releaseWriteLatch();
                     writeLatchesReleased++;
-
+                    
                     bufferCache.unpin(newNode);
                     unpins++;
                 }
-            }
+            }                                   
         } catch (Exception e) {
             e.printStackTrace();
         } finally {
             metaNode.releaseWriteLatch();
             writeLatchesReleased++;
-
+            
             bufferCache.unpin(metaNode);
             unpins++;
         }
     }
-
+    
     public void printTree(IBTreeFrameLeaf leafFrame, IBTreeFrameInterior interiorFrame) throws Exception {
         printTree(rootPage, null, false, leafFrame, interiorFrame);
     }
 
     public void printTree(int pageId, ICachedPage parent, boolean unpin, IBTreeFrameLeaf leafFrame,
             IBTreeFrameInterior interiorFrame) throws Exception {
-
+        
         ICachedPage node = bufferCache.pin(FileInfo.getDiskPageId(fileId, pageId), false);
         pins++;
         node.acquireReadLatch();
         readLatchesAcquired++;
-
+        
         try {
             if (parent != null && unpin == true) {
                 parent.releaseReadLatch();
                 readLatchesReleased++;
-
+                
                 bufferCache.unpin(parent);
                 unpins++;
             }
 
             interiorFrame.setPage(node);
             int level = interiorFrame.getLevel();
-            if (LOGGER.isLoggable(Level.FINEST)) {
-                LOGGER.finest(String.format("%1d ", level));
-                LOGGER.finest(String.format("%3d ", pageId));
+            if (GlobalConfig.ASTERIX_LOGGER.isLoggable(Level.FINEST)) {
+                GlobalConfig.ASTERIX_LOGGER.finest(String.format("%1d ", level));
+                GlobalConfig.ASTERIX_LOGGER.finest(String.format("%3d ", pageId));
                 for (int i = 0; i < currentLevel - level; i++)
-                    LOGGER.finest("    ");
-
+                    GlobalConfig.ASTERIX_LOGGER.finest("    ");
+                
                 String keyString;
-                if (interiorFrame.isLeaf()) {
-                    leafFrame.setPage(node);
-                    keyString = leafFrame.printKeys(cmp);
-                } else {
-                    keyString = interiorFrame.printKeys(cmp);
+                if(interiorFrame.isLeaf()) {
+                	leafFrame.setPage(node);
+                	keyString = leafFrame.printKeys(cmp);
                 }
-
-                LOGGER.finest(keyString);
+                else {
+                	keyString = interiorFrame.printKeys(cmp);
+                }
+                
+                GlobalConfig.ASTERIX_LOGGER.finest(keyString);
             }
 
             if (!interiorFrame.isLeaf()) {
@@ -321,41 +306,40 @@
             } else {
                 node.releaseReadLatch();
                 readLatchesReleased++;
-
+                
                 bufferCache.unpin(node);
                 unpins++;
             }
         } catch (Exception e) {
             node.releaseReadLatch();
             readLatchesReleased++;
-
+            
             bufferCache.unpin(node);
             unpins++;
         }
     }
 
-    public void diskOrderScan(BTreeDiskOrderScanCursor cursor, IBTreeFrameLeaf leafFrame, IBTreeFrameMeta metaFrame)
-            throws Exception {
+    public void diskOrderScan(BTreeDiskOrderScanCursor cursor, IBTreeFrameLeaf leafFrame, IBTreeFrameMeta metaFrame) throws Exception {
         int currentPageId = rootPage + 1;
         int maxPageId = -1;
-
+        
         ICachedPage metaNode = bufferCache.pin(FileInfo.getDiskPageId(fileId, metaDataPage), false);
         pins++;
-
+        
         metaNode.acquireReadLatch();
         readLatchesAcquired++;
-
+        
         try {
             metaFrame.setPage(metaNode);
             maxPageId = metaFrame.getMaxPage();
         } finally {
             metaNode.releaseReadLatch();
             readLatchesAcquired++;
-
+            
             bufferCache.unpin(metaNode);
             unpins++;
         }
-
+        
         ICachedPage page = bufferCache.pin(FileInfo.getDiskPageId(fileId, currentPageId), false);
         page.acquireReadLatch();
         cursor.setBufferCache(bufferCache);
@@ -364,7 +348,7 @@
         cursor.setMaxPageId(maxPageId);
         cursor.open(page, null);
     }
-
+    
     public void search(IBTreeCursor cursor, RangePredicate pred, IBTreeFrameLeaf leafFrame,
             IBTreeFrameInterior interiorFrame) throws Exception {
         BTreeOpContext ctx = new BTreeOpContext();
@@ -519,131 +503,134 @@
             repeatOp = false;
         }
     }
-
+    
+    public long uselessCompressionTime = 0;
+    
     private void insertLeaf(ICachedPage node, int pageId, byte[] data, BTreeOpContext ctx) throws Exception {
-        ctx.leafFrame.setPage(node);
-        SpaceStatus spaceStatus = ctx.leafFrame.hasSpaceInsert(data, cmp);
-        switch (spaceStatus) {
+    	ctx.leafFrame.setPage(node);
+    	SpaceStatus spaceStatus = ctx.leafFrame.hasSpaceInsert(data, cmp);
+    	switch (spaceStatus) {
+    	
+    	case SUFFICIENT_CONTIGUOUS_SPACE: {
+    		// System.out.println("INSERT LEAF");
+    		ctx.leafFrame.insert(data, cmp);
+    		ctx.splitKey.reset();
+    	} break;
 
-            case SUFFICIENT_CONTIGUOUS_SPACE: {
-                // System.out.println("INSERT LEAF");
-                ctx.leafFrame.insert(data, cmp);
-                ctx.splitKey.reset();
-            }
-                break;
+    	case SUFFICIENT_SPACE: {
+    		ctx.leafFrame.compact(cmp);
+    		ctx.leafFrame.insert(data, cmp);
+    		ctx.splitKey.reset();
+    	} break;
 
-            case SUFFICIENT_SPACE: {
-                ctx.leafFrame.compact(cmp);
-                ctx.leafFrame.insert(data, cmp);
-                ctx.splitKey.reset();
-            }
-                break;
+    	case INSUFFICIENT_SPACE: {
+    		// try compressing the page first and see if there is space available    		
+    		long start = System.currentTimeMillis();
+    		boolean reCompressed = ctx.leafFrame.compress(cmp);
+    		long end = System.currentTimeMillis();
+    		if(reCompressed) spaceStatus = ctx.leafFrame.hasSpaceInsert(data, cmp);
+    		
+    		if(spaceStatus == SpaceStatus.SUFFICIENT_CONTIGUOUS_SPACE) {    		
+    			ctx.leafFrame.insert(data, cmp);
+    			ctx.splitKey.reset();    			    			
+    			
+    			usefulCompression++;    			
+    		}
+    		else {
+    			uselessCompressionTime += (end - start);    			    			    			
+    			uselessCompression++;
+    			
+    			// perform split
+    			splitsByLevel[0]++; // debug
+    			int rightSiblingPageId = ctx.leafFrame.getNextLeaf();
+    			ICachedPage rightSibling = null;
+    			if (rightSiblingPageId > 0) {
+    				rightSibling = bufferCache.pin(FileInfo.getDiskPageId(fileId, rightSiblingPageId), false);
+    				pins++;
+    			}
 
-            case INSUFFICIENT_SPACE: {
-                // try compressing the page first and see if there is space available    		
-                ctx.leafFrame.compress(cmp);
-                spaceStatus = ctx.leafFrame.hasSpaceInsert(data, cmp);
+    			treeLatch.writeLock().lock(); // lock is released in
+    			// unsetSmPages(), after sm has
+    			// fully completed
+    			treeLatchesAcquired++;
+    			try {
 
-                if (spaceStatus == SpaceStatus.SUFFICIENT_CONTIGUOUS_SPACE) {
-                    ctx.leafFrame.insert(data, cmp);
-                    ctx.splitKey.reset();
+    				int rightPageId = getFreePage(ctx.metaFrame);
+    				ICachedPage rightNode = bufferCache.pin(FileInfo.getDiskPageId(fileId, rightPageId), true);
+    				pins++;
+    				rightNode.acquireWriteLatch();
+    				writeLatchesAcquired++;
+    				try {
+    					ISlotManager rightSlotManager = leafSlotManagerFactory.getSlotManager();
+    					IBTreeFrameLeaf rightFrame = leafFrameFactory.getFrame();
+    					rightFrame.setPage(rightNode);
+    					rightFrame.initBuffer((byte) 0);
 
-                    usefulCompression++;
-                } else {
-                    uselessCompression++;
+    					int ret = ctx.leafFrame.split(rightFrame, data, cmp, ctx.splitKey);
 
-                    // perform split
-                    splitsByLevel[0]++; // debug
-                    int rightSiblingPageId = ctx.leafFrame.getNextLeaf();
-                    ICachedPage rightSibling = null;
-                    if (rightSiblingPageId > 0) {
-                        rightSibling = bufferCache.pin(FileInfo.getDiskPageId(fileId, rightSiblingPageId), false);
-                        pins++;
-                    }
+    					ctx.smPages.add(pageId);
+    					ctx.smPages.add(rightPageId);
+    					ctx.leafFrame.setSmFlag(true);
+    					rightFrame.setSmFlag(true);
 
-                    treeLatch.writeLock().lock(); // lock is released in
-                    // unsetSmPages(), after sm has
-                    // fully completed
-                    treeLatchesAcquired++;
-                    try {
+    					rightFrame.setNextLeaf(ctx.leafFrame.getNextLeaf());
+    					rightFrame.setPrevLeaf(pageId);
+    					ctx.leafFrame.setNextLeaf(rightPageId);
 
-                        int rightPageId = getFreePage(ctx.metaFrame);
-                        ICachedPage rightNode = bufferCache.pin(FileInfo.getDiskPageId(fileId, rightPageId), true);
-                        pins++;
-                        rightNode.acquireWriteLatch();
-                        writeLatchesAcquired++;
-                        try {
-                            ISlotManager rightSlotManager = leafSlotManagerFactory.getSlotManager();
-                            IBTreeFrameLeaf rightFrame = leafFrameFactory.getFrame();
-                            rightFrame.setPage(rightNode);
-                            rightFrame.initBuffer((byte) 0);
+    					// TODO: we just use increasing numbers as pageLsn, we
+    					// should tie this together with the LogManager and
+    					// TransactionManager
+    					rightFrame.setPageLsn(rightFrame.getPageLsn() + 1);
+    					ctx.leafFrame.setPageLsn(ctx.leafFrame.getPageLsn() + 1);
 
-                            int ret = ctx.leafFrame.split(rightFrame, data, cmp, ctx.splitKey);
+    					if (ret != 0) {
+    						ctx.splitKey.reset();
+    					} else {
+    						// System.out.print("LEAF SPLITKEY: ");
+    						// cmp.printKey(splitKey.getData(), 0);
+    						// System.out.println("");
 
-                            ctx.smPages.add(pageId);
-                            ctx.smPages.add(rightPageId);
-                            ctx.leafFrame.setSmFlag(true);
-                            rightFrame.setSmFlag(true);
+    						ctx.splitKey.setPages(pageId, rightPageId);
+    					}
+    					if (rightSibling != null) {
+    						rightSibling.acquireWriteLatch();
+    						writeLatchesAcquired++;
+    						try {
+    							rightFrame.setPage(rightSibling); // reuse
+    							// rightFrame
+    							// for
+    							// modification
+    							rightFrame.setPrevLeaf(rightPageId);
+    						} finally {
+    							rightSibling.releaseWriteLatch();
+    							writeLatchesReleased++;
+    						}
+    					}
+    				} finally {
+    					rightNode.releaseWriteLatch();
+    					writeLatchesReleased++;
+    					bufferCache.unpin(rightNode);
+    					unpins++;
+    				}
+    			} catch (Exception e) {
+    				treeLatch.writeLock().unlock();
+    				treeLatchesReleased++;
+    				throw e;
+    			} finally {
+    				if (rightSibling != null) {
+    					bufferCache.unpin(rightSibling);
+    					unpins++;
+    				}
+    			}    	
+    		}
+    	} break;   
+    	
+    	}
 
-                            rightFrame.setNextLeaf(ctx.leafFrame.getNextLeaf());
-                            rightFrame.setPrevLeaf(pageId);
-                            ctx.leafFrame.setNextLeaf(rightPageId);
-
-                            // TODO: we just use increasing numbers as pageLsn, we
-                            // should tie this together with the LogManager and
-                            // TransactionManager
-                            rightFrame.setPageLsn(rightFrame.getPageLsn() + 1);
-                            ctx.leafFrame.setPageLsn(ctx.leafFrame.getPageLsn() + 1);
-
-                            if (ret != 0) {
-                                ctx.splitKey.reset();
-                            } else {
-                                // System.out.print("LEAF SPLITKEY: ");
-                                // cmp.printKey(splitKey.getData(), 0);
-                                // System.out.println("");
-
-                                ctx.splitKey.setPages(pageId, rightPageId);
-                            }
-                            if (rightSibling != null) {
-                                rightSibling.acquireWriteLatch();
-                                writeLatchesAcquired++;
-                                try {
-                                    rightFrame.setPage(rightSibling); // reuse
-                                    // rightFrame
-                                    // for
-                                    // modification
-                                    rightFrame.setPrevLeaf(rightPageId);
-                                } finally {
-                                    rightSibling.releaseWriteLatch();
-                                    writeLatchesReleased++;
-                                }
-                            }
-                        } finally {
-                            rightNode.releaseWriteLatch();
-                            writeLatchesReleased++;
-                            bufferCache.unpin(rightNode);
-                            unpins++;
-                        }
-                    } catch (Exception e) {
-                        treeLatch.writeLock().unlock();
-                        treeLatchesReleased++;
-                        throw e;
-                    } finally {
-                        if (rightSibling != null) {
-                            bufferCache.unpin(rightSibling);
-                            unpins++;
-                        }
-                    }
-                }
-            }
-                break;
-
-        }
-
-        node.releaseWriteLatch();
-        writeLatchesReleased++;
-        bufferCache.unpin(node);
-        unpins++;
+    	node.releaseWriteLatch();
+    	writeLatchesReleased++;
+    	bufferCache.unpin(node);
+    	unpins++;
     }
 
     private void insertInterior(ICachedPage node, int pageId, byte[] data, BTreeOpContext ctx) throws Exception {
@@ -1052,8 +1039,7 @@
                     } // end while
                 } else { // smFlag
                     ctx.opRestarts++;
-                    System.out.println("ONGOING SM ON PAGE " + pageId + " AT LEVEL " + ctx.interiorFrame.getLevel()
-                            + ", RESTARTS: " + ctx.opRestarts);
+                    System.out.println("ONGOING SM ON PAGE " + pageId + " AT LEVEL " + ctx.interiorFrame.getLevel() + ", RESTARTS: " + ctx.opRestarts);                    
                     releaseLatch(node, ctx.op, isLeaf);
                     bufferCache.unpin(node);
                     unpins++;
@@ -1107,6 +1093,7 @@
             // failure to pin a new node during a
             // split
             System.out.println("ASTERIX EXCEPTION");
+            e.printStackTrace();
             releaseLatch(node, ctx.op, isLeaf);
             bufferCache.unpin(node);
             unpins++;
@@ -1121,7 +1108,7 @@
 
     private boolean bulkNewPage = false;
 
-    public final class BulkLoadContext {
+    public final class BulkLoadContext {               
         public int slotSize;
         public int leafMaxBytes;
         public int interiorMaxBytes;
@@ -1214,18 +1201,17 @@
         frontier.lastRecord = insBytes;
         frontier.bytesInserted += spaceNeeded;
     }
-
+    
     // assumes btree has been created and opened
-    public BulkLoadContext beginBulkLoad(float fillFactor, IBTreeFrameLeaf leafFrame,
-            IBTreeFrameInterior interiorFrame, IBTreeFrameMeta metaFrame) throws Exception {
-        BulkLoadContext ctx = new BulkLoadContext(fillFactor, leafFrame, interiorFrame, metaFrame);
+    public BulkLoadContext beginBulkLoad(float fillFactor, IBTreeFrameLeaf leafFrame, IBTreeFrameInterior interiorFrame, IBTreeFrameMeta metaFrame) throws Exception {
+        BulkLoadContext ctx = new BulkLoadContext(fillFactor, leafFrame, interiorFrame, metaFrame);        
         return ctx;
     }
-
-    public void bulkLoadAddRecord(BulkLoadContext ctx, byte[] record) throws Exception {
+    
+    public void bulkLoadAddRecord(BulkLoadContext ctx, byte[] record) throws Exception {                        
         NodeFrontier leafFrontier = ctx.nodeFrontiers.get(0);
         IBTreeFrameLeaf leafFrame = ctx.leafFrame;
-
+        
         int spaceNeeded = record.length + ctx.slotSize;
         if (leafFrontier.bytesInserted + spaceNeeded > ctx.leafMaxBytes) {
             int splitKeySize = cmp.getKeySize(leafFrontier.lastRecord, 0);
@@ -1248,22 +1234,21 @@
             leafFrame.setPrevLeaf(prevPageId);
             leafFrontier.bytesInserted = 0;
         }
-
+        
         leafFrame.setPage(leafFrontier.page);
         leafFrame.insertSorted(record, cmp);
         leafFrontier.lastRecord = record;
         leafFrontier.bytesInserted += spaceNeeded;
     }
-
-    public void endBulkLoad(BulkLoadContext ctx) throws Exception {
+    
+    public void endBulkLoad(BulkLoadContext ctx) throws Exception {                
         // copy root
         ICachedPage rootNode = bufferCache.pin(FileInfo.getDiskPageId(fileId, rootPage), bulkNewPage);
         rootNode.acquireWriteLatch();
-        try {
+        try {        
             ICachedPage toBeRoot = ctx.nodeFrontiers.get(ctx.nodeFrontiers.size() - 1).page;
-            System.arraycopy(toBeRoot.getBuffer().array(), 0, rootNode.getBuffer().array(), 0, toBeRoot.getBuffer()
-                    .capacity());
-        } finally {
+            System.arraycopy(toBeRoot.getBuffer().array(), 0, rootNode.getBuffer().array(), 0, toBeRoot.getBuffer().capacity());        
+        } finally {        
             rootNode.releaseWriteLatch();
             bufferCache.unpin(rootNode);
 
@@ -1276,7 +1261,7 @@
         // debug
         currentLevel = (byte) ctx.nodeFrontiers.size();
     }
-
+    
     public IBTreeFrameInteriorFactory getInteriorFrameFactory() {
         return interiorFrameFactory;
     }
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeDiskOrderScanCursor.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeDiskOrderScanCursor.java
index 47f43ab..b2b4a5b 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeDiskOrderScanCursor.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeDiskOrderScanCursor.java
@@ -1,46 +1,32 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.impls;
+package edu.uci.ics.asterix.indexing.btree.impls;
 
-import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeCursor;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrameLeaf;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.ISearchPredicate;
-import edu.uci.ics.hyracks.storage.common.buffercache.IBufferCache;
-import edu.uci.ics.hyracks.storage.common.buffercache.ICachedPage;
-import edu.uci.ics.hyracks.storage.common.file.FileInfo;
+import edu.uci.ics.asterix.common.exceptions.AsterixException;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeCursor;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrameLeaf;
+import edu.uci.ics.asterix.indexing.btree.interfaces.ISearchPredicate;
+import edu.uci.ics.asterix.storage.buffercache.IBufferCache;
+import edu.uci.ics.asterix.storage.buffercache.ICachedPage;
+import edu.uci.ics.asterix.storage.file.FileInfo;
 
 public class BTreeDiskOrderScanCursor implements IBTreeCursor {
-
+    
     // TODO: might want to return records in physical order, not logical order to speed up access
-
+    
     private int recordNum = 0;
     private int recordOffset = -1;
-    private int fileId = -1;
+    private int fileId = -1;    
     int currentPageId = -1;
     int maxPageId = -1; // TODO: figure out how to scan to the end of file, this is dirty and may not with concurrent updates
     private ICachedPage page = null;
     private IBTreeFrameLeaf frame = null;
     private IBufferCache bufferCache = null;
-
+    
     public BTreeDiskOrderScanCursor(IBTreeFrameLeaf frame) {
         this.frame = frame;
     }
-
+    
     @Override
-    public void close() throws HyracksDataException {
+    public void close() throws AsterixException {
         page.releaseReadLatch();
         bufferCache.unpin(page);
         page = null;
@@ -55,91 +41,89 @@
     public ICachedPage getPage() {
         return page;
     }
-
-    private boolean positionToNextLeaf(boolean skipCurrent) throws HyracksDataException {
-        while ((frame.getLevel() != 0 || skipCurrent) && currentPageId <= maxPageId) {
+    
+    private boolean positionToNextLeaf(boolean skipCurrent) throws AsterixException {
+        while( (frame.getLevel() != 0 || skipCurrent) && currentPageId <= maxPageId) {            
             currentPageId++;
-
+            
             ICachedPage nextPage = bufferCache.pin(FileInfo.getDiskPageId(fileId, currentPageId), false);
             nextPage.acquireReadLatch();
-
+            
             page.releaseReadLatch();
             bufferCache.unpin(page);
-
+            
             page = nextPage;
             frame.setPage(page);
             recordNum = 0;
             skipCurrent = false;
-        }
-        if (currentPageId <= maxPageId)
-            return true;
-        else
-            return false;
+        }   
+        if(currentPageId <= maxPageId) return true;
+        else return false;
     }
-
+    
     @Override
-    public boolean hasNext() throws HyracksDataException {
-        if (recordNum >= frame.getNumRecords()) {
+    public boolean hasNext() throws AsterixException {        
+        if(recordNum >= frame.getNumRecords()) {
             boolean nextLeafExists = positionToNextLeaf(true);
-            if (nextLeafExists) {
+            if(nextLeafExists) {
                 recordOffset = frame.getRecordOffset(recordNum);
                 return true;
-            } else {
-                return false;
             }
-        }
-
+            else {
+                return false;                               
+            }
+        }        
+        
         recordOffset = frame.getRecordOffset(recordNum);
         return true;
     }
 
     @Override
-    public void next() throws HyracksDataException {
+    public void next() throws AsterixException {        
         recordNum++;
     }
-
+    
     @Override
-    public void open(ICachedPage page, ISearchPredicate searchPred) throws HyracksDataException {
+    public void open(ICachedPage page, ISearchPredicate searchPred) throws AsterixException {       
         // in case open is called multiple times without closing
-        if (this.page != null) {
+        if(this.page != null) {
             this.page.releaseReadLatch();
             bufferCache.unpin(this.page);
         }
-
+        
         this.page = page;
         recordNum = 0;
         frame.setPage(page);
         boolean leafExists = positionToNextLeaf(false);
-        if (!leafExists) {
-            throw new HyracksDataException(
-                    "Failed to open disk-order scan cursor for B-tree. Traget B-tree has no leaves.");
+        if(!leafExists) {
+            throw new AsterixException("Failed to open disk-order scan cursor for B-tree. Traget B-tree has no leaves.");
         }
     }
-
+    
     @Override
     public void reset() {
         recordNum = 0;
         recordOffset = 0;
         currentPageId = -1;
         maxPageId = -1;
-        page = null;
+        page = null;     
     }
 
     @Override
     public void setBufferCache(IBufferCache bufferCache) {
-        this.bufferCache = bufferCache;
+        this.bufferCache = bufferCache;        
     }
 
     @Override
     public void setFileId(int fileId) {
         this.fileId = fileId;
-    }
-
+    }   
+    
     public void setCurrentPageId(int currentPageId) {
         this.currentPageId = currentPageId;
     }
-
+    
     public void setMaxPageId(int maxPageId) {
         this.maxPageId = maxPageId;
     }
-}
\ No newline at end of file
+}
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeException.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeException.java
index 4e6d9d6..68c8c92 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeException.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeException.java
@@ -1,18 +1,4 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.impls;
+package edu.uci.ics.asterix.indexing.btree.impls;
 
 public class BTreeException extends Exception {
 	
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeMeta.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeMeta.java
index 696a5be..8ddb04a 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeMeta.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeMeta.java
@@ -1,23 +1,9 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.impls;
+package edu.uci.ics.asterix.indexing.btree.impls;
 
 import java.nio.ByteBuffer;
 
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrameMeta;
-import edu.uci.ics.hyracks.storage.common.buffercache.ICachedPage;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrameMeta;
+import edu.uci.ics.asterix.storage.buffercache.ICachedPage;
 
 // all meta pages of this kind have a negative level
 // the first meta page has level -1, all other meta pages have level -2
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeMetaFactory.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeMetaFactory.java
index 88d8bc9..fc12b2a 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeMetaFactory.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeMetaFactory.java
@@ -1,21 +1,7 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.impls;
+package edu.uci.ics.asterix.indexing.btree.impls;
 
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrameMeta;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrameMetaFactory;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrameMeta;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrameMetaFactory;
 
 public class BTreeMetaFactory implements IBTreeFrameMetaFactory {
     @Override
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeNSM.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeNSM.java
index 77dbd62..cd47eee 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeNSM.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeNSM.java
@@ -1,20 +1,6 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.impls;
+package edu.uci.ics.asterix.indexing.btree.impls;
 
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrame;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrame;
 
 public abstract class BTreeNSM extends NSMFrame implements IBTreeFrame {
 	
@@ -54,13 +40,10 @@
 
 	@Override
 	public void setSmFlag(boolean smFlag) {
-		if(smFlag)			
-			buf.put(smFlagOff, (byte)1);		
-		else
-			buf.put(smFlagOff, (byte)0);			
+		if(smFlag)buf.put(smFlagOff, (byte)1);		
+		else buf.put(smFlagOff, (byte)0);			
 	}		
 	
-	// TODO: remove
 	@Override
 	public int getFreeSpaceOff() {
 		return buf.getInt(freeSpaceOff);
@@ -69,9 +52,5 @@
 	@Override
 	public void setFreeSpaceOff(int freeSpace) {
 		buf.putInt(freeSpaceOff, freeSpace);		
-	}
-	
-	@Override
-    public void compress(MultiComparator cmp) {        
-    }
+	}		
 }
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeNSMInterior.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeNSMInterior.java
index 18d53f8..eb0aeb6 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeNSMInterior.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeNSMInterior.java
@@ -1,25 +1,12 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.impls;
+package edu.uci.ics.asterix.indexing.btree.impls;
 
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.Collections;
 
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrame;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrameInterior;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrame;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrameInterior;
+import edu.uci.ics.asterix.om.AInt32;
 
 public class BTreeNSMInterior extends BTreeNSM implements IBTreeFrameInterior {
 		
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeNSMInteriorFactory.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeNSMInteriorFactory.java
index 5360f7d..82b3544 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeNSMInteriorFactory.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeNSMInteriorFactory.java
@@ -1,21 +1,7 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.impls;
+package edu.uci.ics.asterix.indexing.btree.impls;
 
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrameInterior;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrameInteriorFactory;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrameInterior;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrameInteriorFactory;
 
 public class BTreeNSMInteriorFactory implements IBTreeFrameInteriorFactory {
 	@Override
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeNSMLeaf.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeNSMLeaf.java
index 852dc31..6f17876 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeNSMLeaf.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeNSMLeaf.java
@@ -1,23 +1,9 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.impls;
+package edu.uci.ics.asterix.indexing.btree.impls;
 
 import java.nio.ByteBuffer;
 
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrame;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrameLeaf;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrame;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrameLeaf;
 
 public class BTreeNSMLeaf extends BTreeNSM implements IBTreeFrameLeaf {    
 	protected static final int prevLeafOff = smFlagOff + 1;
@@ -74,7 +60,7 @@
 			buf.putInt(numRecordsOff, buf.getInt(numRecordsOff) + 1);
 			buf.putInt(freeSpaceOff, buf.getInt(freeSpaceOff) + data.length);
 			buf.putInt(totalFreeSpaceOff, buf.getInt(totalFreeSpaceOff) - data.length - slotManager.getSlotSize());
-		}
+		}	
 	}
 	
 	@Override
@@ -89,6 +75,7 @@
 
 	@Override
 	public int split(IBTreeFrame rightFrame, byte[] data, MultiComparator cmp, SplitKey splitKey) throws Exception {
+		
 		// before doing anything check if key already exists
 		int slotOff = slotManager.findSlot(buf, data, cmp, true);
 		if (slotOff >= 0) {			
@@ -137,7 +124,7 @@
 		int keySize = cmp.getKeySize(buf.array(), recOff);				
 		splitKey.initData(keySize);
 		System.arraycopy(buf.array(), recOff, splitKey.getData(), 0, keySize);
-		
+			
 		return 0;
 	}
 
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeNSMLeafFactory.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeNSMLeafFactory.java
index 7691b7d..622ebbd 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeNSMLeafFactory.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeNSMLeafFactory.java
@@ -1,21 +1,7 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.impls;
+package edu.uci.ics.asterix.indexing.btree.impls;
 
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrameLeaf;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrameLeafFactory;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrameLeaf;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrameLeafFactory;
 
 public class BTreeNSMLeafFactory implements IBTreeFrameLeafFactory {
 	@Override
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeOp.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeOp.java
index 27fe7cd..fb31065 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeOp.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeOp.java
@@ -1,18 +1,4 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.impls;
+package edu.uci.ics.asterix.indexing.btree.impls;
 
 public enum BTreeOp {
 	BTO_INSERT,
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeOpContext.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeOpContext.java
index 9262b89..2f6b9ba 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeOpContext.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeOpContext.java
@@ -1,26 +1,12 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.impls;
+package edu.uci.ics.asterix.indexing.btree.impls;
 
 import java.util.ArrayList;
 import java.util.Stack;
 
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeCursor;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrameInterior;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrameLeaf;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrameMeta;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeCursor;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrameInterior;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrameLeaf;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrameMeta;
 
 public final class BTreeOpContext {
 	public BTreeOp op;
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeRangeSearchCursor.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeRangeSearchCursor.java
index fc97363..17dcd93 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeRangeSearchCursor.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/BTreeRangeSearchCursor.java
@@ -1,25 +1,11 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.impls;
+package edu.uci.ics.asterix.indexing.btree.impls;
 
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeCursor;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IBTreeFrameLeaf;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.ISearchPredicate;
-import edu.uci.ics.hyracks.storage.common.buffercache.IBufferCache;
-import edu.uci.ics.hyracks.storage.common.buffercache.ICachedPage;
-import edu.uci.ics.hyracks.storage.common.file.FileInfo;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeCursor;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IBTreeFrameLeaf;
+import edu.uci.ics.asterix.indexing.btree.interfaces.ISearchPredicate;
+import edu.uci.ics.asterix.storage.buffercache.IBufferCache;
+import edu.uci.ics.asterix.storage.buffercache.ICachedPage;
+import edu.uci.ics.asterix.storage.file.FileInfo;
 
 public class BTreeRangeSearchCursor implements IBTreeCursor {
 
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/FieldIterator.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/FieldIterator.java
index 1c903b5..bff83cb 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/FieldIterator.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/FieldIterator.java
@@ -1,26 +1,13 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.impls;
+package edu.uci.ics.asterix.indexing.btree.impls;
 
-import edu.uci.ics.hyracks.storage.am.btree.frames.FieldPrefixNSMLeaf;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IFieldAccessor;
+import edu.uci.ics.asterix.indexing.btree.frames.FieldPrefixNSMLeaf;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IFieldAccessor;
 
 //TODO: make members private, only for debugging now
 public class FieldIterator {
     public int recSlotOff = -1;
     public int recOff = -1;
+    public int prefixSlotNum = FieldPrefixSlotManager.RECORD_UNCOMPRESSED;
     public int numPrefixFields = 0;
     public IFieldAccessor[] fields;
     public FieldPrefixNSMLeaf frame;
@@ -55,7 +42,7 @@
         currentField = 0;
         numPrefixFields = 0;
         int recSlot = frame.getBuffer().getInt(recSlotOff);
-        int prefixSlotNum = frame.slotManager.decodeFirstSlotField(recSlot);
+        prefixSlotNum = frame.slotManager.decodeFirstSlotField(recSlot);
         recOff = frame.slotManager.decodeSecondSlotField(recSlot);
                 
         // position to prefix records first (if record is compressed)
@@ -67,14 +54,15 @@
         }
         else {
             recOffRunner = recOff;
-        }
+        }        
     }
     
     public void nextField() {                   
-        // if we have passed the prefix fields of any of the two records, position them to the suffix record
+            	
+    	// if we have passed the prefix fields of any of the two records, position them to the suffix record
         if(currentField+1 == numPrefixFields) recOffRunner = recOff;
         else recOffRunner += fields[currentField].getLength(frame.getBuffer().array(), recOffRunner);
-        currentField++;                        
+        currentField++;        
     }
     
     public int getFieldOff() {
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/FieldPrefixSlotManager.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/FieldPrefixSlotManager.java
index 920964e..6de959c 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/FieldPrefixSlotManager.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/FieldPrefixSlotManager.java
@@ -1,24 +1,10 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.impls;
+package edu.uci.ics.asterix.indexing.btree.impls;
 
 import java.nio.ByteBuffer;
 
-import edu.uci.ics.hyracks.storage.am.btree.frames.FieldPrefixNSMLeaf;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IComparator;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IPrefixSlotManager;
+import edu.uci.ics.asterix.indexing.btree.frames.FieldPrefixNSMLeaf;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IComparator;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IPrefixSlotManager;
 
 public class FieldPrefixSlotManager implements IPrefixSlotManager {
 	
@@ -66,10 +52,9 @@
 	    return FieldPrefixSlotManager.RECORD_UNCOMPRESSED;
 	}
 	
-	
 	public int findSlot(ByteBuffer buf, byte[] data, MultiComparator multiCmp, boolean exact) {				
 		if(frame.getNumRecords() <= 0) encodeSlotFields(RECORD_UNCOMPRESSED, GREATEST_SLOT);
-		
+								
 	    int prefixMid;
 	    int prefixBegin = 0;
 	    int prefixEnd = frame.getNumPrefixRecords() - 1;
@@ -80,29 +65,27 @@
 	    int recPrefixSlotNumUbound = prefixEnd;
 	    
 	    // binary search on the prefix slots to determine upper and lower bounds for the prefixSlotNums in record slots 
-	    if(frame.getNumPrefixRecords() > 0) {
-	    	while(prefixBegin <= prefixEnd) {
-	    		prefixMid = (prefixBegin + prefixEnd) / 2;	    			    		
-	    		int prefixSlotOff = getPrefixSlotOff(prefixMid);
-	    		int prefixSlot = buf.getInt(prefixSlotOff);    		
-	    		int numPrefixFields = decodeFirstSlotField(prefixSlot);
-	    		int prefixRecOff = decodeSecondSlotField(prefixSlot);
-	    		//System.out.println("PREFIX: " + prefixRecOff + " " + buf.getInt(prefixRecOff) + " " + buf.getInt(prefixRecOff+4));
-	    		int cmp = multiCmp.fieldRangeCompare(data, 0, buf.array(), prefixRecOff, 0, numPrefixFields);
-	    		if(cmp < 0) {	    			
-	    		    prefixEnd = prefixMid - 1;
-	    			recPrefixSlotNumLbound = prefixMid - 1;	    				    		
-	    		}
-	    		else if(cmp > 0) {	    			
-	    		    prefixBegin = prefixMid + 1;
-	    			recPrefixSlotNumUbound = prefixMid + 1;
-	    		}
-	    		else {
-	    		    recPrefixSlotNumLbound = prefixMid;
-	    			recPrefixSlotNumUbound = prefixMid;
-	    			prefixMatch = prefixMid;	    			
-	    			break;
-	    		}
+	    while(prefixBegin <= prefixEnd) {
+	    	prefixMid = (prefixBegin + prefixEnd) / 2;	    			    		
+	    	int prefixSlotOff = getPrefixSlotOff(prefixMid);
+	    	int prefixSlot = buf.getInt(prefixSlotOff);    		
+	    	int numPrefixFields = decodeFirstSlotField(prefixSlot);
+	    	int prefixRecOff = decodeSecondSlotField(prefixSlot);
+	    	//System.out.println("PREFIX: " + prefixRecOff + " " + buf.getInt(prefixRecOff) + " " + buf.getInt(prefixRecOff+4));
+	    	int cmp = multiCmp.fieldRangeCompare(data, 0, buf.array(), prefixRecOff, 0, numPrefixFields);
+	    	if(cmp < 0) {	    			
+	    		prefixEnd = prefixMid - 1;
+	    		recPrefixSlotNumLbound = prefixMid - 1;	    				    		
+	    	}
+	    	else if(cmp > 0) {	    			
+	    		prefixBegin = prefixMid + 1;
+	    		recPrefixSlotNumUbound = prefixMid + 1;
+	    	}
+	    	else {
+	    		recPrefixSlotNumLbound = prefixMid;
+	    		recPrefixSlotNumUbound = prefixMid;
+	    		prefixMatch = prefixMid;	    			
+	    		break;
 	    	}
 	    }
 	    
@@ -129,7 +112,7 @@
             else {             	
             	if(prefixSlotNum < recPrefixSlotNumLbound) cmp = 1;
             	else if(prefixSlotNum > recPrefixSlotNumUbound) cmp = -1;
-            	else cmp = compareCompressed(data, buf.array(), prefixSlotNum, recMid, multiCmp);            	            	
+            	else cmp = compareCompressed(data, buf.array(), prefixSlotNum, recMid, multiCmp);            	            	            	
             }    
             
             if(cmp < 0) recEnd = recMid - 1;
@@ -139,8 +122,8 @@
 	    
 	    //System.out.println("RECS: " + recBegin + " " + recMid + " " + recEnd);
 	    
-        if(exact) return encodeSlotFields(prefixMatch, GREATEST_SLOT);
-        if(recBegin > frame.getNumRecords() - 1) encodeSlotFields(prefixMatch, GREATEST_SLOT);
+        if(exact) return encodeSlotFields(prefixMatch, GREATEST_SLOT);                       
+        if(recBegin > (frame.getNumRecords() - 1)) return encodeSlotFields(prefixMatch, GREATEST_SLOT);
         
         // do final comparison to determine whether the search key is greater than all keys or in between some existing keys
         int recSlotOff = getRecSlotOff(recBegin);
@@ -154,7 +137,7 @@
         
         if(cmp < 0) return encodeSlotFields(prefixMatch, recBegin);
         else return encodeSlotFields(prefixMatch, GREATEST_SLOT);
-	}
+	}	
 	
 	public int compareCompressed(byte[] record, byte[] page, int prefixSlotNum, int recSlotNum, MultiComparator multiCmp) {                          
          IComparator[] cmps = multiCmp.getComparators();
@@ -164,8 +147,8 @@
          
          int recRunner = 0;
          int cmp = 0;
-         for(int i = 0; i < multiCmp.getKeyLength(); i++) {     
-             cmp = cmps[i].compare(record, recRunner, buf.array(), fieldIter.getFieldOff());             
+         for(int i = 0; i < multiCmp.getKeyLength(); i++) {
+        	 cmp = cmps[i].compare(record, recRunner, buf.array(), fieldIter.getFieldOff());             
              if(cmp < 0) return -1;                 
              else if(cmp > 0) return 1;             
              fieldIter.nextField();
@@ -211,7 +194,9 @@
 			int slotEndOff = getRecSlotEndOff();
 			int slotOff = getRecSlotOff(slotNum);
 			int length = (slotOff - slotEndOff) + slotSize;			
-			System.arraycopy(frame.getBuffer().array(), slotEndOff, frame.getBuffer().array(), slotEndOff - slotSize, length);						
+			System.arraycopy(frame.getBuffer().array(), slotEndOff, frame.getBuffer().array(), slotEndOff - slotSize, length);
+			//System.out.println("MOVING SLOTS: " + length + " " + (frame.getNumRecords()*4));
+			
 			int newSlot = encodeSlotFields(decodeFirstSlotField(slot), recOff);
 			setSlot(slotOff, newSlot);			
 			//System.out.println("SETTING B: " + slotOff + " " + recOff);
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/MultiComparator.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/MultiComparator.java
index d126b59..25a7186 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/MultiComparator.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/MultiComparator.java
@@ -1,21 +1,7 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.impls;
+package edu.uci.ics.asterix.indexing.btree.impls;
 
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IComparator;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IFieldAccessor;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IComparator;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IFieldAccessor;
 
 public class MultiComparator {
     
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/NSMFrame.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/NSMFrame.java
index 97721db..66577e2 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/NSMFrame.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/NSMFrame.java
@@ -1,27 +1,13 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.impls;
+package edu.uci.ics.asterix.indexing.btree.impls;
 
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.Collections;
 
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IFrame;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.ISlotManager;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.SpaceStatus;
-import edu.uci.ics.hyracks.storage.common.buffercache.ICachedPage;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IFrame;
+import edu.uci.ics.asterix.indexing.btree.interfaces.ISlotManager;
+import edu.uci.ics.asterix.indexing.btree.interfaces.SpaceStatus;
+import edu.uci.ics.asterix.storage.buffercache.ICachedPage;
 
 public class NSMFrame implements IFrame {	
 	
@@ -214,9 +200,9 @@
 	public int getTotalFreeSpace() {
 		return buf.getInt(totalFreeSpaceOff);
 	}
-
+	
     @Override
-    public void compress(MultiComparator cmp) {
-        
+    public boolean compress(MultiComparator cmp) {
+        return false;
     }
 }
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/NodeFrontier.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/NodeFrontier.java
index cd27d97..5b5de07 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/NodeFrontier.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/NodeFrontier.java
@@ -1,20 +1,6 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.impls;
+package edu.uci.ics.asterix.indexing.btree.impls;
 
-import edu.uci.ics.hyracks.storage.common.buffercache.ICachedPage;
+import edu.uci.ics.asterix.storage.buffercache.ICachedPage;
 
 public class NodeFrontier {
 	public int bytesInserted;
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/OrderedSlotManager.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/OrderedSlotManager.java
index 9cb2c24..8717b50 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/OrderedSlotManager.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/OrderedSlotManager.java
@@ -1,29 +1,15 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.impls;
+package edu.uci.ics.asterix.indexing.btree.impls;
 
 import java.nio.ByteBuffer;
 
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.IFrame;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.ISlotManager;
+import edu.uci.ics.asterix.indexing.btree.interfaces.IFrame;
+import edu.uci.ics.asterix.indexing.btree.interfaces.ISlotManager;
 
 public class OrderedSlotManager implements ISlotManager {
 	
 	private static final int slotSize = 4;
 	private IFrame frame;
-	
+		
 	// TODO: mix in interpolation search
 	@Override
 	public int findSlot(ByteBuffer buf, byte[] data, MultiComparator multiCmp, boolean exact) {
@@ -90,7 +76,7 @@
 		else {
 			int slotStartOff = getSlotStartOff();
 			int length = (slotOff - slotStartOff) + slotSize;			
-			System.arraycopy(frame.getBuffer().array(), slotStartOff, frame.getBuffer().array(), slotStartOff - slotSize, length);			
+			System.arraycopy(frame.getBuffer().array(), slotStartOff, frame.getBuffer().array(), slotStartOff - slotSize, length);
 			setSlot(slotOff, recOff);
 			return slotOff;
 		}		
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/OrderedSlotManagerFactory.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/OrderedSlotManagerFactory.java
index 2daa514..af7da1c 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/OrderedSlotManagerFactory.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/OrderedSlotManagerFactory.java
@@ -1,21 +1,7 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.impls;
+package edu.uci.ics.asterix.indexing.btree.impls;
 
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.ISlotManager;
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.ISlotManagerFactory;
+import edu.uci.ics.asterix.indexing.btree.interfaces.ISlotManager;
+import edu.uci.ics.asterix.indexing.btree.interfaces.ISlotManagerFactory;
 
 public class OrderedSlotManagerFactory implements ISlotManagerFactory {
 	
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/RangePredicate.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/RangePredicate.java
index 8f85a1f..7caeda8 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/RangePredicate.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/RangePredicate.java
@@ -1,20 +1,6 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.impls;
+package edu.uci.ics.asterix.indexing.btree.impls;
 
-import edu.uci.ics.hyracks.storage.am.btree.interfaces.ISearchPredicate;
+import edu.uci.ics.asterix.indexing.btree.interfaces.ISearchPredicate;
 
 public class RangePredicate implements ISearchPredicate {
 	
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/SlotOffRecOff.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/SlotOffRecOff.java
index c198527..0d10052 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/SlotOffRecOff.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/SlotOffRecOff.java
@@ -1,18 +1,4 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.impls;
+package edu.uci.ics.asterix.indexing.btree.impls;
 
 public class SlotOffRecOff implements Comparable<SlotOffRecOff> {
 	public int slotOff;
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/SplitKey.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/SplitKey.java
index 0088277..dda30b5 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/SplitKey.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/SplitKey.java
@@ -1,18 +1,4 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.impls;
+package edu.uci.ics.asterix.indexing.btree.impls;
 
 import java.nio.ByteBuffer;
 
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeCursor.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeCursor.java
index e05dbb7..5956e67 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeCursor.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeCursor.java
@@ -1,21 +1,7 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.interfaces;
+package edu.uci.ics.asterix.indexing.btree.interfaces;
 
-import edu.uci.ics.hyracks.storage.common.buffercache.IBufferCache;
-import edu.uci.ics.hyracks.storage.common.buffercache.ICachedPage;
+import edu.uci.ics.asterix.storage.buffercache.IBufferCache;
+import edu.uci.ics.asterix.storage.buffercache.ICachedPage;
 
 public interface IBTreeCursor {
 	public void reset();
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrame.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrame.java
index 8afe219..be68796 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrame.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrame.java
@@ -1,21 +1,7 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.interfaces;
+package edu.uci.ics.asterix.indexing.btree.interfaces;
 
-import edu.uci.ics.hyracks.storage.am.btree.impls.MultiComparator;
-import edu.uci.ics.hyracks.storage.am.btree.impls.SplitKey;
+import edu.uci.ics.asterix.indexing.btree.impls.MultiComparator;
+import edu.uci.ics.asterix.indexing.btree.impls.SplitKey;
 
 public interface IBTreeFrame extends IFrame {
 	// TODO; what if records more than half-page size?
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameFactory.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameFactory.java
index e0fd99f..e9747d0 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameFactory.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameFactory.java
@@ -1,18 +1,4 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.interfaces;
+package edu.uci.ics.asterix.indexing.btree.interfaces;
 
 public interface IBTreeFrameFactory {	
 	public IBTreeFrame getFrame(ISlotManager slotManager);
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameInterior.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameInterior.java
index 677a2a9..f5af6d2 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameInterior.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameInterior.java
@@ -1,21 +1,7 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.interfaces;
+package edu.uci.ics.asterix.indexing.btree.interfaces;
 
-import edu.uci.ics.hyracks.storage.am.btree.impls.MultiComparator;
-import edu.uci.ics.hyracks.storage.am.btree.impls.RangePredicate;
+import edu.uci.ics.asterix.indexing.btree.impls.MultiComparator;
+import edu.uci.ics.asterix.indexing.btree.impls.RangePredicate;
 
 public interface IBTreeFrameInterior extends IBTreeFrame {
 	//public int getChildPageId(IFieldAccessor[] fields, MultiComparator cmp);
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameInteriorFactory.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameInteriorFactory.java
index 4296607..53df368 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameInteriorFactory.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameInteriorFactory.java
@@ -1,18 +1,4 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.interfaces;
+package edu.uci.ics.asterix.indexing.btree.interfaces;
 
 public interface IBTreeFrameInteriorFactory {	
 	public IBTreeFrameInterior getFrame();
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameLeaf.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameLeaf.java
index f66ce73..f7e2d1c 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameLeaf.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameLeaf.java
@@ -1,18 +1,4 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.interfaces;
+package edu.uci.ics.asterix.indexing.btree.interfaces;
 
 public interface IBTreeFrameLeaf extends IBTreeFrame {	
 	public void setNextLeaf(int nextPage);
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameLeafFactory.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameLeafFactory.java
index fb15046..5a4e593 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameLeafFactory.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameLeafFactory.java
@@ -1,19 +1,5 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.interfaces;
+package edu.uci.ics.asterix.indexing.btree.interfaces;
 
-public interface IBTreeFrameLeafFactory {
-    public IBTreeFrameLeaf getFrame();
+public interface IBTreeFrameLeafFactory {	
+	public IBTreeFrameLeaf getFrame();
 }
\ No newline at end of file
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameMeta.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameMeta.java
index f430d38..435aff8 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameMeta.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameMeta.java
@@ -1,20 +1,6 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.interfaces;
+package edu.uci.ics.asterix.indexing.btree.interfaces;
 
-import edu.uci.ics.hyracks.storage.common.buffercache.ICachedPage;
+import edu.uci.ics.asterix.storage.buffercache.ICachedPage;
 
 public interface IBTreeFrameMeta {
     public void initBuffer(int level);
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameMetaFactory.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameMetaFactory.java
index 27b61cd..a8ced77 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameMetaFactory.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeFrameMetaFactory.java
@@ -1,18 +1,4 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.interfaces;
+package edu.uci.ics.asterix.indexing.btree.interfaces;
 
 public interface IBTreeFrameMetaFactory {   
     public IBTreeFrameMeta getFrame();
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeSlotManager.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeSlotManager.java
index 443ffc4..b7bea46 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeSlotManager.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IBTreeSlotManager.java
@@ -1,22 +1,8 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.interfaces;
+package edu.uci.ics.asterix.indexing.btree.interfaces;
 
 import java.nio.ByteBuffer;
 
-import edu.uci.ics.hyracks.storage.am.btree.impls.MultiComparator;
+import edu.uci.ics.asterix.indexing.btree.impls.MultiComparator;
 
 // a slot consists of two fields:
 // first field is 1 byte, it indicates the slot number of a prefix record
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IComparator.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IComparator.java
index b26f799..2577602 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IComparator.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IComparator.java
@@ -1,18 +1,4 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.interfaces;
+package edu.uci.ics.asterix.indexing.btree.interfaces;
 
 public interface IComparator {		
 	public int compare(byte[] dataA, int recOffA, byte[] dataB, int recOffB);
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IFieldAccessor.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IFieldAccessor.java
index 65d4802..2441965 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IFieldAccessor.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IFieldAccessor.java
@@ -1,18 +1,4 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.interfaces;
+package edu.uci.ics.asterix.indexing.btree.interfaces;
 
 public interface IFieldAccessor {	    
     public int getLength(byte[] data, int offset); // skip to next field (equivalent to adding length of field to offset)        
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IFieldAccessorFactory.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IFieldAccessorFactory.java
index a5a4603..4088376 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IFieldAccessorFactory.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IFieldAccessorFactory.java
@@ -1,18 +1,4 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.interfaces;
+package edu.uci.ics.asterix.indexing.btree.interfaces;
 
 public interface IFieldAccessorFactory {
 	public IFieldAccessor getKey();
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IFrame.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IFrame.java
index 90142e4..e3a2291 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IFrame.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IFrame.java
@@ -1,23 +1,9 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.interfaces;
+package edu.uci.ics.asterix.indexing.btree.interfaces;
 
 import java.nio.ByteBuffer;
 
-import edu.uci.ics.hyracks.storage.am.btree.impls.MultiComparator;
-import edu.uci.ics.hyracks.storage.common.buffercache.ICachedPage;
+import edu.uci.ics.asterix.indexing.btree.impls.MultiComparator;
+import edu.uci.ics.asterix.storage.buffercache.ICachedPage;
 
 public interface IFrame {	
 	public void setPage(ICachedPage page);
@@ -29,7 +15,7 @@
 	public void delete(byte[] data, MultiComparator cmp, boolean exactDelete) throws Exception;
 	
 	public void compact(MultiComparator cmp);
-	public void compress(MultiComparator cmp) throws Exception;
+	public boolean compress(MultiComparator cmp) throws Exception;
 	
 	public void initBuffer(byte level);
 	
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IFrameCompressor.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IFrameCompressor.java
index 88f3fae..c267643 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IFrameCompressor.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IFrameCompressor.java
@@ -1,22 +1,8 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.interfaces;
+package edu.uci.ics.asterix.indexing.btree.interfaces;
 
-import edu.uci.ics.hyracks.storage.am.btree.frames.FieldPrefixNSMLeaf;
-import edu.uci.ics.hyracks.storage.am.btree.impls.MultiComparator;
+import edu.uci.ics.asterix.indexing.btree.frames.FieldPrefixNSMLeaf;
+import edu.uci.ics.asterix.indexing.btree.impls.MultiComparator;
 
 public interface IFrameCompressor {
-	public void compress(FieldPrefixNSMLeaf frame, MultiComparator cmp) throws Exception;
+	public boolean compress(FieldPrefixNSMLeaf frame, MultiComparator cmp) throws Exception;
 }
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IPrefixSlotManager.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IPrefixSlotManager.java
index 7996f1a..d107995 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IPrefixSlotManager.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/IPrefixSlotManager.java
@@ -1,23 +1,9 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.interfaces;
+package edu.uci.ics.asterix.indexing.btree.interfaces;
 
 import java.nio.ByteBuffer;
 
-import edu.uci.ics.hyracks.storage.am.btree.frames.FieldPrefixNSMLeaf;
-import edu.uci.ics.hyracks.storage.am.btree.impls.MultiComparator;
+import edu.uci.ics.asterix.indexing.btree.frames.FieldPrefixNSMLeaf;
+import edu.uci.ics.asterix.indexing.btree.impls.MultiComparator;
 
 // a slot consists of two fields:
 // first field is 1 byte, it indicates the slot number of a prefix record
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/ISearchPredicate.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/ISearchPredicate.java
index b04bca1..80629f0 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/ISearchPredicate.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/ISearchPredicate.java
@@ -1,18 +1,4 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.interfaces;
+package edu.uci.ics.asterix.indexing.btree.interfaces;
 
 public interface ISearchPredicate {
 	public boolean isForward();	
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/ISlotManager.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/ISlotManager.java
index 45aa5e1..f0cc594 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/ISlotManager.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/ISlotManager.java
@@ -1,22 +1,8 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.interfaces;
+package edu.uci.ics.asterix.indexing.btree.interfaces;
 
 import java.nio.ByteBuffer;
 
-import edu.uci.ics.hyracks.storage.am.btree.impls.MultiComparator;
+import edu.uci.ics.asterix.indexing.btree.impls.MultiComparator;
 
 
 public interface ISlotManager {
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/ISlotManagerFactory.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/ISlotManagerFactory.java
index fc8b8b4..d738626 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/ISlotManagerFactory.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/ISlotManagerFactory.java
@@ -1,18 +1,4 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.interfaces;
+package edu.uci.ics.asterix.indexing.btree.interfaces;
 
 public interface ISlotManagerFactory {
 	public ISlotManager getSlotManager();
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/SpaceStatus.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/SpaceStatus.java
index 15496dd..a1ccb5f 100644
--- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/SpaceStatus.java
+++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/interfaces/SpaceStatus.java
@@ -1,18 +1,4 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- * 
- *     http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.hyracks.storage.am.btree.interfaces;
+package edu.uci.ics.asterix.indexing.btree.interfaces;
 
 public enum SpaceStatus {
 	INSUFFICIENT_SPACE,
