some cleaning up of client side