generator stript/templates cleanup