SlugCodec minor refactor + more unittests

Also, fixes #4