Refactor doWork method
doWork on demand
Build on demand, and on accepting payload event