I have the following Javascript class, which is used to render a waterfalling display as lines are fed to it. I have omitted nearly all