Remove unused function
Improve "bufname" function
Fix typo
Fix another subtle issue with unicode