Form autogeneration refactory