Improve performance by 4x.

Declare class function differently so it displays properly in Chrome
Memory Profiler.
Improve performance by 4x with custom string search algorithm instead of
using regex.search.
Improve output performance

Improve output performance by using the same buffer array to build
document.