added data-char attribute to character spans / split formatting into separate methods for legibility