Expand dictionary & refactor