Cleanup and refinement.