Fix for out of memory exception.

Files with lots of comments were causing out of memory errors to get thrown. If he comments are processed in chunks instead of all at once, the error could be avoided.