Added slugify function