modularising the js so I can include or ignore modules