Introduce generator module

* move all code generation related things to separate files
* improve adder tree