Refactored and implemented CLI command structure