Clean some calls to getLocale, unused variables and use statements