Sanitize all parts of the userAgent
Fix code formatting