Simplify flag parsing