Routine for dictionary creation.