Rewrites Table of Contents Program