Multiple event queues support and some bugfixing.

dat iz hell