Refactor of publishing form