Minor fixes and script structuring.

Initial design of generation script standardization.