Fix exception in execute.
Refactor internals.
Introduce new published flag.