Refactored package method in cli