Extracted cli into class