Add index file generation, file merging, and line tracking.