Applied IntelliJ code formatter and some inspection fixes