Refactor code to add initial support for OptionalDefOperand.