Remove charAt calls

Replace `charAt` calls with index lookup.
Index lookups are ~10% faster and save a few bytes
http://jsperf.com/charat-vs-index/2