More work on queue implementation