Added ability to use a custom slugify function