Refactor.
Remove the need for a variable.
Continuing to massage the code.
Better explanation of how the slug is built.
Extract a method.
Flatten the code a bit more.