refactor templates
fix clone script