split js code into independent files