Now compiles with Java 1.8
Updated to use Stream API