Optimized applyAnnotations by usage of filter().
Added output of annotation ids and rendering of subranges.
Performance optimization of Text.partition
Reduced number of DOM API calls.