Move higher functions from queue to engine to keep queue as abstract as possible