improve config and script templates