Added final data structure. This program has become a mess.