Refact publish