Feature #40 extract cli to separate module

* Fixes #42 
* Fixes #40