Cleanups. Prepare for annotated tree generation.