How To Survive a Ground-Up Rewrite Without Losing Your Sanity