Small rework of the JS