Java 8. Refactored everything.

Cleaned up the codebase and API.