Merge index and js