SlugCodec minor refactor + unittests

Also, fixes #4