Use flag.CommandLine flag set explicitly.
Added more configuration options + tests.