Removed unnecessary casts
ignoring Idea files
updated to Java 8