Introduce queue abstraction