Refactor: Applied de::FlagOp enum and de::applyFlagOperation template