Refactor Dictionary Functions.