More polishing for stacks and queues