Added a queue for handling UI tasks