added templates to removed special characters and replace first or end line _ symbols