Refactored set of tuples into dictionary