fixed unicode issue, in code and cleaned it up in a few comments