fix the encoding var. A constant? what was I thinking?
add tests for slug()