Improved script for generating stub content