Command line client and related client refactoring