code cleaning + WIP new publishing system