Some style cleanups and character encoding tweaks