Added regions to generated code. Test for action reverse.