Basic code quality maintenance, adding comments, constants, and generally breaking up dense code
Made multiline comment states persistent by moving commentState to a class variable, further cleanup
Removed a bug with the regex that was chunking empties.