The refactoring is finally done and working and I am now working on adding more features to the code generation.