Add some cmdline args. Compact some code.