Multiqueue support

Adds support for mulitqueues