Flag command overhaul