diff --git a/.travis.yml b/.travis.yml
index 9bcf999..e358d25 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,3 +1,3 @@
 language: java
 jdk:
-  - oraclejdk8
+  - oraclejdk7
diff --git a/nb-configuration.xml b/nb-configuration.xml
index 36ad590..932be69 100644
--- a/nb-configuration.xml
+++ b/nb-configuration.xml
@@ -29,6 +29,6 @@
         <org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.text-line-wrap>none</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.text-line-wrap>
         <org-netbeans-modules-editor-indent.text.x-fortran.CodeStyle.project.text-limit-width>132</org-netbeans-modules-editor-indent.text.x-fortran.CodeStyle.project.text-limit-width>
         <netbeans.compile.on.save>all</netbeans.compile.on.save>
-        <netbeans.hint.jdkPlatform>JDK_1.8</netbeans.hint.jdkPlatform>
+        <netbeans.hint.jdkPlatform>JDK_1.7</netbeans.hint.jdkPlatform>
     </properties>
 </project-shared-configuration>
diff --git a/pom.xml b/pom.xml
index 5e4b3b1..ef45a8f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -53,8 +53,8 @@
 	</dependencies>
 	<properties>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<maven.compiler.source>1.8</maven.compiler.source>
-		<maven.compiler.target>1.8</maven.compiler.target>
+		<maven.compiler.source>1.7</maven.compiler.source>
+		<maven.compiler.target>1.7</maven.compiler.target>
 	</properties>
 	<build>
 		<plugins>
diff --git a/src/test/java/com/intel/jndn/utils/client/impl/AdvancedClientFileTestIT.java b/src/integration-test/java/com/intel/jndn/utils/client/impl/AdvancedClientFileTestIT.java
similarity index 92%
rename from src/test/java/com/intel/jndn/utils/client/impl/AdvancedClientFileTestIT.java
rename to src/integration-test/java/com/intel/jndn/utils/client/impl/AdvancedClientFileTestIT.java
index 45572a7..6710711 100644
--- a/src/test/java/com/intel/jndn/utils/client/impl/AdvancedClientFileTestIT.java
+++ b/src/integration-test/java/com/intel/jndn/utils/client/impl/AdvancedClientFileTestIT.java
@@ -18,6 +18,7 @@
 import com.intel.jndn.utils.server.impl.SegmentedServerHelper;
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Random;
 import java.util.concurrent.CompletableFuture;
@@ -68,14 +69,21 @@
     long startTime = System.currentTimeMillis();
     AdvancedClient client = new AdvancedClient();
     List<CompletableFuture<Data>> requests = expressInterests(client, consumer, PREFIX, NUM_MESSAGES);
-    List<Data> datas = requests.stream().map((f) -> TestHelper.retrieve(f)).collect(Collectors.toList());
+    List<Data> datas = new ArrayList<>();
+    for (CompletableFuture<Data> f : requests) {
+      datas.add(TestHelper.retrieve(f));
+    }
     long endTime = System.currentTimeMillis();
 
     logger.info(String.format("Transfered %d bytes in %d ms", MESSAGE_SIZE_BYTES * NUM_MESSAGES, endTime - startTime));
   }
 
   private List<CompletableFuture<Data>> expressInterests(Client client, Face face, Name name, int count) {
-    return IntStream.range(0, count).boxed().map((i) -> client.getAsync(face, name)).collect(Collectors.toList());
+    List<CompletableFuture<Data>> list = new ArrayList<>();
+    for (int i = 0; i < count; i++) {
+      list.add(client.getAsync(face, name));
+    }
+    return list;
   }
 
   private class AdvancedDataServer implements OnInterestCallback {
diff --git a/src/test/java/com/intel/jndn/utils/client/impl/AdvancedClientStressTestIT.java b/src/integration-test/java/com/intel/jndn/utils/client/impl/AdvancedClientStressTestIT.java
similarity index 92%
rename from src/test/java/com/intel/jndn/utils/client/impl/AdvancedClientStressTestIT.java
rename to src/integration-test/java/com/intel/jndn/utils/client/impl/AdvancedClientStressTestIT.java
index 6a99599..e66daae 100644
--- a/src/test/java/com/intel/jndn/utils/client/impl/AdvancedClientStressTestIT.java
+++ b/src/integration-test/java/com/intel/jndn/utils/client/impl/AdvancedClientStressTestIT.java
@@ -18,6 +18,7 @@
 import com.intel.jndn.utils.server.impl.SegmentedServerHelper;
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Random;
 import java.util.concurrent.CompletableFuture;
@@ -68,14 +69,22 @@
     long startTime = System.currentTimeMillis();
     AdvancedClient client = new AdvancedClient();
     List<CompletableFuture<Data>> requests = expressInterests(client, consumer, PREFIX, NUM_MESSAGES);
-    List<Data> datas = requests.stream().map((f) -> TestHelper.retrieve(f)).collect(Collectors.toList());
+
+    List<Data> datas = new ArrayList<>();
+    for (CompletableFuture<Data> f : requests) {
+      datas.add(TestHelper.retrieve(f));
+    }
     long endTime = System.currentTimeMillis();
 
     logger.info(String.format("Transfered %d bytes in %d ms", MESSAGE_SIZE_BYTES * NUM_MESSAGES, endTime - startTime));
   }
 
   private List<CompletableFuture<Data>> expressInterests(Client client, Face face, Name name, int count) {
-    return IntStream.range(0, count).boxed().map((i) -> client.getAsync(face, name)).collect(Collectors.toList());
+    List<CompletableFuture<Data>> list = new ArrayList<>();
+    for (int i = 0; i < count; i++) {
+      list.add(client.getAsync(face, name));
+    }
+    return list;
   }
 
   private class RandomDataServer implements OnInterestCallback {
diff --git a/src/test/java/com/intel/jndn/utils/client/impl/SimpleClientTestIT.java b/src/integration-test/java/com/intel/jndn/utils/client/impl/SimpleClientTestIT.java
similarity index 90%
rename from src/test/java/com/intel/jndn/utils/client/impl/SimpleClientTestIT.java
rename to src/integration-test/java/com/intel/jndn/utils/client/impl/SimpleClientTestIT.java
index f49525b..7e53d77 100644
--- a/src/test/java/com/intel/jndn/utils/client/impl/SimpleClientTestIT.java
+++ b/src/integration-test/java/com/intel/jndn/utils/client/impl/SimpleClientTestIT.java
@@ -16,11 +16,14 @@
 import com.intel.jndn.utils.client.impl.SimpleClient;
 import com.intel.jndn.utils.TestHelper;
 import java.io.IOException;
+import java.util.ArrayList;
 import java.util.concurrent.CompletableFuture;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import java.util.stream.IntStream;
 import java.util.stream.Stream;
+
+import com.intel.jndn.utils.processing.impl.CompressionStage;
 import net.named_data.jndn.Data;
 import net.named_data.jndn.Face;
 import net.named_data.jndn.Interest;
@@ -106,12 +109,16 @@
     Thread.sleep(500);
 
     // request all packets
-    Stream<CompletableFuture<Data>> futures = IntStream.range(0, numInterests)
-            .boxed().map((i) -> instance.getAsync(consumerFace, PREFIX_RETRIEVE_MULTIPLE));
+    ArrayList<CompletableFuture<Data>> futures = new ArrayList<>();
+    for (int i = 0; i < numInterests; i++) {
+      futures.add(instance.getAsync(consumerFace, PREFIX_RETRIEVE_MULTIPLE));
+    }
 
     // check all returned packets
-    futures.map((f) -> TestHelper.retrieve(f))
-            .forEach((d) -> assertEquals(servedData.getContent().toString(), d.getContent().toString()));
+    for (CompletableFuture<Data> f : futures) {
+      Data d = TestHelper.retrieve(f);
+      assertEquals(servedData.getContent().toString(), d.getContent().toString());
+    }
   }
 
   private class DataServer implements OnInterestCallback {
diff --git a/src/test/java/com/intel/jndn/utils/server/impl/SegmentedServerTestIT.java b/src/integration-test/java/com/intel/jndn/utils/server/impl/SegmentedServerTestIT.java
similarity index 100%
rename from src/test/java/com/intel/jndn/utils/server/impl/SegmentedServerTestIT.java
rename to src/integration-test/java/com/intel/jndn/utils/server/impl/SegmentedServerTestIT.java
diff --git a/src/main/java/com/intel/jndn/utils/client/impl/AdvancedClient.java b/src/main/java/com/intel/jndn/utils/client/impl/AdvancedClient.java
index be1e876..d5d8c8e 100644
--- a/src/main/java/com/intel/jndn/utils/client/impl/AdvancedClient.java
+++ b/src/main/java/com/intel/jndn/utils/client/impl/AdvancedClient.java
@@ -94,10 +94,10 @@
    */
   @Override
   public CompletableFuture<Data> getAsync(Face face, Interest interest) {
-    CompletableFuture<Data> future = new CompletableFuture<>();
+    final CompletableFuture<Data> future = new CompletableFuture<>();
 
     try {
-      DataStream stream = getSegmentsAsync(face, interest);
+      final DataStream stream = getSegmentsAsync(face, interest);
 
       stream.observe(new OnException() {
         public void onException(Exception exception) {
diff --git a/src/main/java/com/intel/jndn/utils/client/impl/DefaultStreamingClient.java b/src/main/java/com/intel/jndn/utils/client/impl/DefaultStreamingClient.java
index 55fa0f0..e40e4e7 100644
--- a/src/main/java/com/intel/jndn/utils/client/impl/DefaultStreamingClient.java
+++ b/src/main/java/com/intel/jndn/utils/client/impl/DefaultStreamingClient.java
@@ -70,9 +70,9 @@
    * @return
    * @throws IOException
    */
-  public InputStream getStreamAsync(DataStream onDataStream, OnException onException) throws IOException {
+  public InputStream getStreamAsync(final DataStream onDataStream, OnException onException) throws IOException {
     PipedInputStream in = new PipedInputStream();
-    PipedOutputStream out = new PipedOutputStream(in);
+    final PipedOutputStream out = new PipedOutputStream(in);
 
     onDataStream.observe(onException);
 
diff --git a/src/main/java/com/intel/jndn/utils/client/impl/SegmentedDataStream.java b/src/main/java/com/intel/jndn/utils/client/impl/SegmentedDataStream.java
index 41fd86a..45200f3 100644
--- a/src/main/java/com/intel/jndn/utils/client/impl/SegmentedDataStream.java
+++ b/src/main/java/com/intel/jndn/utils/client/impl/SegmentedDataStream.java
@@ -16,19 +16,16 @@
 import com.intel.jndn.utils.client.OnComplete;
 import com.intel.jndn.utils.client.OnException;
 import com.intel.jndn.utils.client.DataStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
+
+import java.util.*;
+import java.util.function.Consumer;
+import java.util.function.Predicate;
 import java.util.logging.Logger;
 import java.util.stream.Collectors;
-import net.named_data.jndn.Data;
-import net.named_data.jndn.Interest;
-import net.named_data.jndn.Name;
-import net.named_data.jndn.OnData;
-import net.named_data.jndn.OnTimeout;
+
+import net.named_data.jndn.*;
 import net.named_data.jndn.encoding.EncodingException;
+import net.named_data.jndn.sync.ChronoSync2013;
 
 /**
  * As packets are received, they are mapped by their last component's segment
@@ -49,7 +46,10 @@
   private volatile long current = -1;
   private volatile long end = Long.MAX_VALUE;
   private Map<Long, Data> packets = new HashMap<>();
-  private List<Object> observers = new ArrayList<>();
+  private List<OnData> observersOnData = new ArrayList<>();
+  private List<OnComplete> observersOnComplete = new ArrayList<>();
+  private List<OnException> observersOnException = new ArrayList<>();
+  private List<OnTimeout> observersOnTimeout = new ArrayList<>();
   private Exception exception;
 
   @Override
@@ -90,22 +90,22 @@
 
   @Override
   public void observe(OnData onData) {
-    observers.add(onData);
+    observersOnData.add(onData);
   }
 
   @Override
   public void observe(OnComplete onComplete) {
-    observers.add(onComplete);
+    observersOnComplete.add(onComplete);
   }
 
   @Override
   public void observe(OnException onException) {
-    observers.add(onException);
+    observersOnException.add(onException);
   }
 
   @Override
   public void observe(OnTimeout onTimeout) {
-    observers.add(onTimeout);
+    observersOnTimeout.add(onTimeout);
   }
 
   @Override
@@ -145,10 +145,10 @@
       do {
         current++;
         assert (packets.containsKey(current));
-        Data retrieved = packets.get(current);
-        observersOfType(OnData.class).stream().forEach((OnData cb) -> {
+        final Data retrieved = packets.get(current);
+        for (OnData cb : observersOnData) {
           cb.onData(interest, retrieved);
-        });
+        }
       } while (hasNextPacket());
     }
 
@@ -172,28 +172,24 @@
 
   @Override
   public synchronized void onComplete() {
-    observersOfType(OnComplete.class).stream().forEach((OnComplete cb) -> {
+    for (OnComplete cb : observersOnComplete) {
       cb.onComplete();
-    });
+    }
   }
 
   @Override
   public synchronized void onTimeout(Interest interest) {
-    observersOfType(OnTimeout.class).stream().forEach((OnTimeout cb) -> {
+    for (OnTimeout cb : observersOnTimeout) {
       cb.onTimeout(interest);
-    });
+    }
   }
 
   @Override
   public synchronized void onException(Exception exception) {
     this.exception = exception;
 
-    observersOfType(OnException.class).stream().forEach((OnException cb) -> {
+    for (OnException cb : observersOnException) {
       cb.onException(exception);
-    });
-  }
-
-  private <T> List<T> observersOfType(Class<T> type) {
-    return observers.stream().filter((Object o) -> type.isAssignableFrom(o.getClass())).map((o) -> (T) o).collect(Collectors.toList());
+    }
   }
 }
diff --git a/src/test/java/com/intel/jndn/utils/TestHelper.java b/src/test/java/com/intel/jndn/utils/TestHelper.java
index a73aba4..fbf931e 100644
--- a/src/test/java/com/intel/jndn/utils/TestHelper.java
+++ b/src/test/java/com/intel/jndn/utils/TestHelper.java
@@ -24,8 +24,6 @@
 import java.util.concurrent.TimeUnit;
 import java.util.logging.Level;
 import java.util.logging.Logger;
-import java.util.stream.Collectors;
-import java.util.stream.IntStream;
 import net.named_data.jndn.Data;
 import net.named_data.jndn.Face;
 import net.named_data.jndn.Name;
@@ -51,15 +49,19 @@
   }
 
   public static List<CompletableFuture<Data>> buildFutureSegments(Name name, int from, int to) {
-    return buildSegments(name, from, to).stream()
-            .map((d) -> CompletableFuture.completedFuture(d))
-            .collect(Collectors.toList());
+    List<CompletableFuture<Data>> list = new ArrayList<>();
+    for (Data d : buildSegments(name, from, to)) {
+      list.add(CompletableFuture.completedFuture(d));
+    }
+    return list;
   }
 
   public static List<Data> buildSegments(Name name, int from, int to) {
-    return IntStream.range(from, to).boxed()
-            .map((i) -> buildData(new Name(name).appendSegment(i), i.toString(), to - 1))
-            .collect(Collectors.toList());
+    List<Data> list = new ArrayList<>();
+    for (Integer i = from; i < to; i++) {
+      list.add(buildData(new Name(name).appendSegment(i), i.toString(), to - 1));
+    }
+    return list;
   }
 
   public static Data buildData(Name name, String content) {
diff --git a/src/test/java/com/intel/jndn/utils/client/impl/DefaultSegmentedClientTest.java b/src/test/java/com/intel/jndn/utils/client/impl/DefaultSegmentedClientTest.java
index 2d65724..7ed72d4 100644
--- a/src/test/java/com/intel/jndn/utils/client/impl/DefaultSegmentedClientTest.java
+++ b/src/test/java/com/intel/jndn/utils/client/impl/DefaultSegmentedClientTest.java
@@ -22,6 +22,8 @@
 import net.named_data.jndn.Interest;
 import net.named_data.jndn.Name;
 import static org.junit.Assert.assertEquals;
+
+import net.named_data.jndn.OnData;
 import org.junit.Test;
 
 /**
@@ -40,9 +42,12 @@
     Interest interest = new Interest(name);
     DataStream stream = instance.getSegmentsAsync(face, interest);
 
-    TestCounter counter = new TestCounter();
-    stream.observe((i, d) -> {
-      counter.count++;
+    final TestCounter counter = new TestCounter();
+    stream.observe(new OnData() {
+      @Override
+      public void onData(Interest interest, Data data) {
+        counter.count++;
+      }
     });
 
     for (Data segment : TestHelper.buildSegments(name, 0, 5)) {
@@ -77,9 +82,12 @@
     Interest interest = new Interest(name);
     DataStream stream = instance.getSegmentsAsync(face, interest);
 
-    TestCounter counter = new TestCounter();
-    stream.observe((i, d) -> {
-      counter.count++;
+    final TestCounter counter = new TestCounter();
+    stream.observe(new OnData() {
+      @Override
+      public void onData(Interest interest, Data data) {
+        counter.count++;
+      }
     });
 
     for (Data segment : TestHelper.buildSegments(name, 0, 5)) {
diff --git a/src/test/java/com/intel/jndn/utils/client/impl/SegmentedDataStreamTest.java b/src/test/java/com/intel/jndn/utils/client/impl/SegmentedDataStreamTest.java
index 2f165b9..9407cfc 100644
--- a/src/test/java/com/intel/jndn/utils/client/impl/SegmentedDataStreamTest.java
+++ b/src/test/java/com/intel/jndn/utils/client/impl/SegmentedDataStreamTest.java
@@ -20,6 +20,7 @@
 import net.named_data.jndn.Interest;
 import net.named_data.jndn.Name;
 import net.named_data.jndn.Name.Component;
+import net.named_data.jndn.OnData;
 import net.named_data.jndn.encoding.EncodingException;
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
@@ -50,13 +51,16 @@
   public void testAddingUnorderedData() throws StreamException {
     Name name = new Name("/test/segmented/data/stream");
     Interest interest = new Interest(name);
-    ArrayList<Long> segments = new ArrayList<>();
+    final ArrayList<Long> segments = new ArrayList<>();
 
-    instance.observe((i, d) -> {
-      try {
-        segments.add(d.getName().get(-1).toSegment());
-      } catch (EncodingException ex) {
-        throw new RuntimeException(ex);
+    instance.observe(new OnData() {
+      @Override
+      public void onData(Interest i, Data d) {
+        try {
+          segments.add(d.getName().get(-1).toSegment());
+        } catch (EncodingException ex) {
+          throw new RuntimeException(ex);
+        }
       }
     });
 
@@ -99,10 +103,10 @@
   @Test
   public void testOrderedPackets() {
     int end = 10;
-    IntStream.range(0, end).forEach((i) -> {
+    for (int i = 0; i < end; i++) {
       addPacketToInstance(i);
       assertEquals(i, instance.current());
-    });
+    };
 
     assertEquals(end, instance.list().length);
   }
