factored enums out to defs.d
modify state machine to identify class of register