Re-add char cache because it's still used by markup label (and others?), fix indexing bug, styleguide issues.