Added message queue and improved workflow handling