a major check in with modification to code using defer object and auto script generation.