Updated code; removed shared_ptrs to shared queues