user agent cleanup and user language detect and set