Fix encoding
Remove unused code