Add unpublish and publish helpers, switch to using them.

The previous way of publishing and unpublishing content didn't work.
Use the new ORM for relation setting, previous one stopped working.