added relations to the survey model. Modified the publish action.