Initial work on the delayed publish handler. Need to have a think about how this will work a bit more before implementing fully.