Move query history slice into client struct