Added flush client
Added refresh to client
Added optimize to client