finish fix generation of actions, usage of testing flag and generate auto entry exit