CLI refactoring.