modularize: extract cli part from module part; slight refactor