Improve memory usage

Give this a shot for the memory leak in issue #1.

I don't have the large history file to verify that this works but in ChangesetMD it took my memory usage to a constant 20 MB instead of swelling to 2 GB by the end of the file. I did a few tests with your sample data and it did reliably reduce the memory footprint at the end of parsing by 1-2 MB. With such a small sample file I can't tell if that is significant or just an artifact of the garbage collector being poked differently.