Fix IntelliJ warnings

Makes the code cleaner