fragments are now zero-indexed
rewrite fragment index attributes to leave no gaps between fragments