Moved wating func for queue into the WebQ Client library. Refactored with better message handling and time out handling.