Fixed CodeClimate code smells