[Ready] clean up by cordoval

This is a wip now. please do not merge. I will ask questions below.

I have a strong view against this module and generating code in general but i will contribute to see if i can control the madness to a certain extent.