Learning to separate js code into modules