Refactored the cli update mecanism