RTI operator implemented

Refactored the conversion of Flags to byte and back into helpers.