Extract the cli to separate class in example project for block 1
Simplify code