Patch 4 & 5 should be squashed before commit. Patch 4 "works" on it's own, but doesn't account for edit list fix-ups. I seperated them to make reviewing easier. Patch 5 merges ctts_data into the new mov_index_entries struct I created, so it touches quite a lot, but results in a fair amount of code simplification.