Reorganizing js files. Still WIP.