Introducing createSlug function

Added respective tests