Migration to Java 8

Refactored all code to use new Java 8 features (lambdas and method handlers)
Also made the following design changes:
F extends java.util.function.Function (changed f() to invoke apply() and retained apply() as abstract).
F2 extends BiFunction
P1 extends Supplier