Add missing headers
Pass sleep time to client_impl
also fix stupid warnings