Refactor CreateCommandItem