Message queuing, resume logic, minor fixes and cleanup