An attempt to make the JS modular