behavior code generation - state gen half done #16
Finished behavior generation #16