Some cleanup and fixing unicode bug