Cleanup and refinements