cleanup commented lines, add publish_job function