Changed sorted collection to store pointer to actual object on heap instead of pointer to all items.