Switched to utf8 and fixed some coding style issues.