End of refactoring, adds comments on the client side scripts