Slugs YAY & Cleanup

Managed to get slugs working in the url so everything is alot prettier
:) still need to add some more conditionals into view my snippets
function, but i did them preiviously so wont take long.

After some digging and brain hurt i found its not always a good idea to
use global variables and in my case arrays, always thought it was a
good idea, but infact i didnt really need it in the first place.

SLEEP