Various IntelliJ Inspection fixes.