diff --git a/hyracks/hyracks-dataflow-common/src/main/java/edu/uci/ics/hyracks/dataflow/common/comm/io/ArrayTupleReference.java b/hyracks/hyracks-dataflow-common/src/main/java/edu/uci/ics/hyracks/dataflow/common/comm/io/ArrayTupleReference.java
new file mode 100644
index 0000000..b265283
--- /dev/null
+++ b/hyracks/hyracks-dataflow-common/src/main/java/edu/uci/ics/hyracks/dataflow/common/comm/io/ArrayTupleReference.java
@@ -0,0 +1,41 @@
+package edu.uci.ics.hyracks.dataflow.common.comm.io;
+
+import edu.uci.ics.hyracks.dataflow.common.data.accessors.ITupleReference;
+
+/**
+ * An ArrayTupleReference provides access to a tuple that is not serialized into
+ * a frame. It is meant to be reset directly with the field slots and tuple data
+ * provided by ArrayTupleBuilder. The purpose is to avoid coping the built tuple
+ * into a frame before being able to use it as an ITupleReference.
+ * 
+ * @author alexander.behm
+ */
+public class ArrayTupleReference implements ITupleReference {
+	private int[] fEndOffsets;
+	private byte[] tupleData;
+
+	public void reset(int[] fEndOffsets, byte[] tupleData) {
+		this.fEndOffsets = fEndOffsets;
+		this.tupleData = tupleData;
+	}
+	
+	@Override
+	public int getFieldCount() {
+		return fEndOffsets.length;
+	}
+
+	@Override
+	public byte[] getFieldData(int fIdx) {
+		return tupleData;
+	}
+
+	@Override
+	public int getFieldStart(int fIdx) {
+		return (fIdx == 0) ? 0 : fEndOffsets[fIdx - 1]; 
+	}
+
+	@Override
+	public int getFieldLength(int fIdx) {
+		return (fIdx == 0) ? fEndOffsets[0] : fEndOffsets[fIdx] - fEndOffsets[fIdx - 1];
+	}
+}
diff --git a/hyracks/hyracks-tests/hyracks-storage-am-invertedindex-test/src/test/java/edu/uci/ics/hyracks/storage/am/invertedindex/WordTokenizerTest.java b/hyracks/hyracks-tests/hyracks-storage-am-invertedindex-test/src/test/java/edu/uci/ics/hyracks/storage/am/invertedindex/WordTokenizerTest.java
index b31205f..53fb96d 100644
--- a/hyracks/hyracks-tests/hyracks-storage-am-invertedindex-test/src/test/java/edu/uci/ics/hyracks/storage/am/invertedindex/WordTokenizerTest.java
+++ b/hyracks/hyracks-tests/hyracks-storage-am-invertedindex-test/src/test/java/edu/uci/ics/hyracks/storage/am/invertedindex/WordTokenizerTest.java
@@ -139,8 +139,6 @@
 
             Integer hashedToken = in.readInt();
 
-            // System.out.println(hashedToken);
-
             Assert.assertEquals(hashedToken, expectedCountedHashedUTF8Tokens.get(tokenCount));
 
             tokenCount++;
@@ -173,8 +171,6 @@
 
             Integer hashedToken = in.readInt();
 
-            // System.out.println(hashedToken);
-
             Assert.assertEquals(expectedHashedUTF8Tokens.get(tokenCount), hashedToken);
 
             tokenCount++;
@@ -207,23 +203,19 @@
 
             String strToken = in.readUTF();
 
-            // System.out.println(strToken);
-
             Assert.assertEquals(expectedUTF8Tokens.get(tokenCount), strToken);
 
             tokenCount++;
         }
     }
 
-    // JAQL
+    // JAQL Hash
     public int tokenHash(String token, int tokenCount) {
         int h = AbstractUTF8Token.GOLDEN_RATIO_32;
         for (int i = 0; i < token.length(); i++) {
-            System.out.print((int)token.charAt(i) + " ");
         	h ^= token.charAt(i);
             h *= AbstractUTF8Token.GOLDEN_RATIO_32;
         }
-        System.out.println("CHK");
         return h + tokenCount;
     }
 }
