Restructure js files; add some style