Split up js files into more modular pieces