refactored client js file structures