Replaced SDO and NET state machines with preprocessor versions.