Fixing some warnings from CodeClimate