factor out CLI args handling in a separate namespace