make sure a slug is generated on publish and fix some notices
added unit tests
prettified query mod
Merge pull request #159 from alleyinteractive/bugfix-publish-with-parent-slug

make sure a slug is generated on publish and fix some notices