Refactoring Form Widgets Code generation scripts