Rerefactored structure of modules and controllers on script of HTML client to use URL to control global state