code modernization - removed use of lists in lieu of actual dictionaries.