Separate javascript into modules