cleand some templates stuff