Use charAt instead of indexing into strings to support IE
Merge branch 'master' into gh-pages