CodeClimate optimizations