Refactor DictScheme class