correct cmd-line parsing impl
added cli processing
minor cleanup
stmt download wip