Refactor CLI
Refactor CLI

Use promise with Q