More work on the JS infrastructure