cleanup of the code belonging to slugify