Queue implementation

Queues completed, merging with master