Separate JS code to .js source files