Full JDK 8 support. Minor fixes