Cleanup and repairs