reorg js files, closes 154
upstream merge