diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/ElementSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/ElementSpans.java
index bbe9f59..f366b84 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/ElementSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/ElementSpans.java
@@ -111,32 +111,25 @@
 	 * 	@author margaretha
 	 * */
 	private void readPayload(CandidateElementSpans cs) throws IOException {   	
-		List<byte[]> payloadList = (List<byte[]>) termSpans.getPayload();
-		BytesRef payload = new BytesRef(payloadList.get(0));
-	    		//.getPostings().getPayload();
-	    //ByteBuffer payloadBuffer = ByteBuffer.allocate(128);
-	    
-	    if (payload != null) {
-			// Copy some payloads like start character and end character
-	    	//payloadBuffer.put(payload.bytes, payload.offset, 8);
+		List<byte[]> payload = (List<byte[]>) termSpans.getPayload();
+		int length = payload.get(0).length;
+		ByteBuffer bb = ByteBuffer.allocate(length);
+		bb.put(payload.get(0));
+		
+	    if (!payload.isEmpty()) {
+			// set element end position from payload
+			cs.setEnd(bb.getInt(8));
 			
-			cs.setEnd(PayloadReader.readInteger(payload,8));
-			
-			if (hasSpanId){
-				// Copy rest of payloads after the end position and elementref
-				//payloadBuffer.put(payload.bytes, payload.offset + 14, payload.length - 14);				
-				cs.setSpanId(PayloadReader.readShort(payload,12));
+			if (hasSpanId){ // copy element id
+				cs.setSpanId(bb.getShort(12));
 			}
-			else{
-				// Copy rest of payloads after the end position
-				//payloadBuffer.put(payload.bytes, payload.offset + 12, payload.length - 12);
+			else{ // set element id -1
 				cs.setSpanId((short) -1);
 			}
-			
-			//byte[] offsetCharacters = new byte[8];
-			//System.arraycopy(payloadBuffer.array(), 0, offsetCharacters, 0, 8);
-			
-			cs.setPayloads(Collections.singletonList(PayloadReader.readOffset(payload)));
+			// Copy the start and end character offsets
+			byte[] b = new byte[8];
+			System.arraycopy(bb.array(), 0, b, 0, 8);
+			cs.setPayloads(Collections.singletonList(b));
 	    }
 	    else {	
 			cs.setEnd(cs.getStart());
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/PayloadReader.java b/src/main/java/de/ids_mannheim/korap/query/spans/PayloadReader.java
deleted file mode 100644
index a69a6d5..0000000
--- a/src/main/java/de/ids_mannheim/korap/query/spans/PayloadReader.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package de.ids_mannheim.korap.query.spans;
-
-import java.nio.ByteBuffer;
-
-import org.apache.lucene.util.BytesRef;
-
-public class PayloadReader {
-
-	/**	Get the offset bytes from the payload.
-	 * */
-	public static byte[] readOffset(BytesRef payload){
-		byte[] b = new byte[8];
-		System.arraycopy(payload.bytes, payload.offset, b, 0, 8);
-		return b;
-	}
-	
-	/**	Get the end position bytes from the payload and cast it to int. 
-	 * */
-	public static int readInteger(BytesRef payload, int start) {
-		byte[] b = new byte[4];
-		System.arraycopy(payload.bytes, payload.offset + start, b, 0, 4);
-		return ByteBuffer.wrap(b).getInt();		
-	}
-	
-	/**	Get the elementRef bytes from the payload and cast it into short.
-	 * */
-	public static short readShort(BytesRef payload, int start) {
-    	byte[] b = new byte[2];
-    	System.arraycopy(payload.bytes, payload.offset + start, b, 0, 2);
-    	return ByteBuffer.wrap(b).getShort();
-	}
-}
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/RelationSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/RelationSpans.java
index f026994..487f841 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/RelationSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/RelationSpans.java
@@ -1,6 +1,7 @@
 package de.ids_mannheim.korap.query.spans;
 
 import java.io.IOException;
+import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -12,7 +13,6 @@
 import org.apache.lucene.search.spans.Spans;
 import org.apache.lucene.search.spans.TermSpans;
 import org.apache.lucene.util.Bits;
-import org.apache.lucene.util.BytesRef;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -110,39 +110,39 @@
 	private void readPayload(CandidateRelationSpan cs) {
 		List<byte[]> payload = (List<byte[]>) cs.getPayloads();
 		int length = payload.get(0).length;
-		BytesRef payloadBytesRef = new BytesRef(payload.get(0));
+		ByteBuffer bb = ByteBuffer.allocate(length);
+		bb.put(payload.get(0));
 		
-		int i;
-		
+		int i;		
 		switch (length) {
-			case 10: // Token to token
-				i = PayloadReader.readInteger(payloadBytesRef,0);
+			case 10: // Token to token				
+				i = bb.getInt(0);
 				cs.setRightStart(i-1);
 				cs.setRightEnd(i);
 				break;
 	
 			case 14: // Token to span
-				cs.setRightStart(PayloadReader.readInteger(payloadBytesRef,0));
-				cs.setRightEnd(PayloadReader.readInteger(payloadBytesRef,4));
+				cs.setRightStart(bb.getInt(0));
+				cs.setRightEnd(bb.getInt(4));
 				break;
 				
 			case 15: // Span to token
-				cs.setEnd(PayloadReader.readInteger(payloadBytesRef,0));
-				i = PayloadReader.readInteger(payloadBytesRef,5);
+				cs.setEnd(bb.getInt(0));
+				i = bb.getInt(5);
 				cs.setRightStart(i-1);
 				cs.setRightEnd(i);
 				break;
 			
 			case 18: // Span to span
-				cs.setEnd(PayloadReader.readInteger(payloadBytesRef,0));
-				cs.setRightStart(PayloadReader.readInteger(payloadBytesRef,4));
-				cs.setRightEnd(PayloadReader.readInteger(payloadBytesRef,8));
+				cs.setEnd(bb.getInt(0));
+				cs.setRightStart(bb.getInt(4));
+				cs.setRightEnd(bb.getInt(8));
 				break;
 		}		
 		
-		cs.setRightId(PayloadReader.readShort(payloadBytesRef, length-2)); //right id
-		cs.setLeftId(PayloadReader.readShort(payloadBytesRef, length-4)); //left id
-		cs.setSpanId(PayloadReader.readShort(payloadBytesRef, length-6)); //relation id
+		cs.setRightId(bb.getShort(length-2)); //right id
+		cs.setLeftId(bb.getShort(length-4)); //left id
+		cs.setSpanId(bb.getShort(length-6)); //relation id
 		// Payload is cleared.		
 	}
 
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/SpansWithAttribute.java b/src/main/java/de/ids_mannheim/korap/query/spans/SpansWithAttribute.java
index 9287a4d..40b8d40 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/SpansWithAttribute.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/SpansWithAttribute.java
@@ -33,9 +33,6 @@
 	
 	protected Logger logger = LoggerFactory.getLogger(SpansWithAttribute.class);
 
-        // This advices the java compiler to ignore all loggings
-        public static final boolean DEBUG = false;	
-
 	public SpansWithAttribute(SpanWithAttributeQuery spanWithAttributeQuery,
 			SpansWithId withIdSpans,
 			AtomicReaderContext context, Bits acceptDocs,
@@ -115,8 +112,7 @@
 		
 		for (AttributeSpans attribute: attributeList){			
 			if (withAttributeSpans.getSpanId() != attribute.getSpanId()){
-			        if (DEBUG)
-				    logger.info("attribute ref doesn't match");
+//				    logger.info("attribute ref doesn't match");
 				if (withAttributeSpans.getSpanId() < attribute.getSpanId())
 					hasMoreSpans = attribute.next();
 				else {
@@ -137,8 +133,7 @@
 			if (!notAttribute.isFinish() && 
 					withAttributeSpans.start() == notAttribute.start() &&
 					withAttributeSpans.getSpanId() == notAttribute.getSpanId()){
-			        if (DEBUG)
-				    logger.info("not attribute ref exists");
+//				    logger.info("not attribute ref exists");
 				hasMoreSpans = withAttributeSpans.next();	
 				return false;
 			}
@@ -154,17 +149,14 @@
 		while (hasMoreSpans){
 			
 			if (withAttributeSpans.getSpanId() < 1){ // the element does not have an attribute
-				withAttributeSpans.hasSpanId = true; // dummy setting enabling reading elementRef
 				hasMoreSpans = withAttributeSpans.next();
-				if (DEBUG)
-				    logger.info("skip");
+//			    logger.info("skip");
 				continue;
 			}
 			
 			if (checkAttributeListPosition() && 
 					checkNotAttributeListPosition()){
-			        if (DEBUG)
-				    logger.info("element is found: "+ withAttributeSpans.start());
+//				    logger.info("element is found: "+ withAttributeSpans.start());
 				return true;
 			}			
 		}		
@@ -181,8 +173,7 @@
 		
 		for (AttributeSpans a : notAttributeList){
 			// advance the doc# of not AttributeSpans
-		        if (DEBUG)
-			    logger.info("a "+a.start());
+			// logger.info("a "+a.start());
 			while (!a.isFinish() &&	 a.doc() <= withAttributeSpans.doc()){
 				
 				if (a.doc() == withAttributeSpans.doc() &&
@@ -206,8 +197,7 @@
 		
 		for (AttributeSpans a : attributeList){
 			if(!ensureSamePosition(withAttributeSpans, a)) return false;
-			        if (DEBUG)
-				    logger.info("pos:" + withAttributeSpans.start());
+			//	    logger.info("pos:" + withAttributeSpans.start());
 				if (isFirst){ 
 					isFirst = false;
 					currentPosition = withAttributeSpans.start();
@@ -218,8 +208,7 @@
 				
 			}				 
 		}
-		if (DEBUG)
-		    logger.info("same pos: "+isSame+ ", pos "+withAttributeSpans.start());
+		//    logger.info("same pos: "+isSame+ ", pos "+withAttributeSpans.start());
 		return isSame;
 	}
 	
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/TermSpansWithId.java b/src/main/java/de/ids_mannheim/korap/query/spans/TermSpansWithId.java
index 2cf0c5b..7d29adc 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/TermSpansWithId.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/TermSpansWithId.java
@@ -1,6 +1,7 @@
 package de.ids_mannheim.korap.query.spans;
 
 import java.io.IOException;
+import java.nio.ByteBuffer;
 import java.util.List;
 import java.util.Map;
 
@@ -51,8 +52,9 @@
 	
 	private void readPayload() throws IOException{
 		List<byte[]> payload = (List<byte[]>) firstSpans.getPayload();
-		BytesRef payloadBytesRef = new BytesRef(payload.get(0));
-		setSpanId(PayloadReader.readShort(payloadBytesRef, 0)); //term id
+		ByteBuffer bb = ByteBuffer.allocate(payload.get(0).length);
+		bb.put(payload.get(0));
+		setSpanId(bb.getShort(0)); //term id
 	}
 	
 
