client js cleanup