Code refactoring and start of dictionary comparisons