Converted mode enumeration to defines.