Improve code thanks to IDEA inpections