Some more JS reorg