Reorganizing javascript files