Added slugify helper function