Rearrange js file