Added dictionary creation and export to text.