refactored publication/scripting