cleanup of source files
initial version of cli
move common writer operations to outside of if-block
Merge branch 'feature/improve-cli' into develop
add output type json