Migrate to Java 8.

Resolves #6.