Put argparsing in a function