code refactoring + WIP new publishing system