"restructuring of client side js"