Changed the structure of the javascript files.