Added /test gen and Flag Generation