Added flags and viewcfg