refactoring worker FIFO into separate module.