Adding part of the CLI code and removing debugging print statements