improve script with better argument handling and code structure
minor changes
update to latest cli package
update to simplify role handling