reworked test order.
Added toArray method.
Added enter and exit
Made addStateMethod() cascade down the chain
fixed rootState()