added some minitests to check the functionality and modified the code to fix case sensitivity and duplicate slugs