Detect encoding with charlock_holmes
Remove some unneeded code