Added a fifo buffer type to be used for the work queue.
Self-review and bugfix.