Minimal queue implementation.