Improve `slugify` function