Added pre-generation source, and generate script