First working version of the oldest living parent algorithm. It's currently done with nested loops. Checking in a save point before I rip it all apart to get rid of the nest loops...