span and .innerHTML optimizations