Change in the generator, and adding the unit tests

adding working logic tests to the generator
Resolving conflicts