Refactored CommandLineClient.java