I haven't got the source code for this any more (computer died and took most of my stuff with it), but could it be modified to store just simple numbers instead of entity pointers? I have a need for dynamically-allocated arrays of numbers for something I'm working on.