Java 8 compatibility & cleanup source