Fix compilation errors in IntelliJ
Remove code incompatible with latest Java8 version