Refactored CommandFlags.
(untested)