Added Queue class for event queuing (see CandyBot for examples of this).