Refactored logic into DictionaryFlattener, updated README