refactor commands packages